The E57 format is used for storing 3D point clouds (from e.g. LiDAR), and is implemented in libE57. Unfortunately, that library is relatively unmaintained, and doesn’t build out-of-the-box on Mac OS X. Fortunately, Andy Maloney has already forked it and patched it to address OS X compatibility and other issues.
CloudCompare is a popular cross-platform software package for working with point clouds that uses libE57 for E57 support, but as of this writing the latest distributed Mac OS X build doesn’t have E57 support enabled (yet). Since building CloudCompare myself with E57 support enabled was a little tricky, I wanted to document the process for others. This assumes some command-line familiarity and a working Homebrew install, but hopefully it will be of some use.
- Install the dependencies you’ll need to build CloudCompare:
brew install xerces-c qt@5.5 cmake
- Clone CloudCompare:
git clone --recursive https://github.com/cloudcompare/trunk.git cloudcompare
- Build/install
libE57Format
:cd cloudcompare/contrib/libE57Format
- Edit
CMakeLists.txt
to sayset(Xerces_USE_STATIC_LIBS Off)
instead ofset(Xerces_USE_STATIC_LIBS On)
- Run CMake:
XERCES_ROOT="/usr/local/Cellar/xerces-c/3.2.1/" cmake .
- Build:
make
- Install:
sudo make install
(this will install to/usr/local/E57Format-2.0-x86_64-darwin
)
- Build CloudCompare:
cd ../..
(get back to thecloudcompare
root directory)mkdir build && cd build
- Configure CMake:
XERCES_ROOT="/usr/local/Cellar/xerces-c/3.2.1/" CMAKE_PREFIX_PATH="/usr/local/Cellar/qt@5.5/5.5.1_1/lib/cmake/" ccmake ..
- Press
c
to configure. Presse
to exit any warnings, if necessary. Scroll down toOPTION_USE_LIBE57FORMAT
and press “enter” to toggle it toON
- Press
c
to configure again. Presse
to exit warnings again, if necessary. ChangeLIBE57FORMAT_INSTALL_DIR
to/usr/local/E57Format-2.0-x86_64-darwin
- Press
c
to configure again. Presse
to exit warnings again, if necessary. Pressg
to generate config and exit. Presse
to exit warnings again, if necessary. - Build CloudCompare with:
make
- Run the resulting CloudCompare app with:
open qCC/CloudCompare.app