-
Notifications
You must be signed in to change notification settings - Fork 3
PointCloud and Python PDAL
- What is a pointcloud ?
Wikipedia says "A point cloud is a set of data points in space".
- ok, but why bother for ICESat-2 ?
Because ICESat-2 also provides point in space, in the form of geolocated photons (ATL03)!
- so do we always need to think of ICESat-2 as "unstructured" pointclouds ? I thought I could use them as a set of uniform sampled elevation values along a profile...
Nah, the higher products (ATL06, ATL08) are gridded using the raw point clouds ! These have uniform spacing, which is determined by the grid size in which the raw pointcloud was aggregated ..
- oh, so that's why we might have some luck playing with pointcloud libraries, but do we always need a pointcloud special library to analyse ATL03 ?
Who told ? basic exploration can be done using native python ecosystem itself ! See this example from Philip and also todays land ice Tutorial.
The idea here is that maybe we can use established pointcloud processing library to do independent filtering and gridding and generate a product like ATL06, ATL08.
- PDAL is specific library for pointcloud.
- Ames Stereo Pipeline is a stereo processing library but has some essential functions for pointcloud file conversion, gridding and alignment.
Installing PDAL via conda does not come natively compiled with HDF support. For this, one needs to compile PDAL yourself.
Here some instructions:
conda create -n pdal-build
conda activate pdal-build
conda install laz-perf laszip sqlite libxml2 curl gdal hdf5 cmake compilers libspatialite eigen ninja zstd numpy make
git clone https://github.com/PDAL/PDAL.git pdal
cd pdal
mkdir build
cd build
CFLAGS= CXXFLAGS= CC=/srv/conda/envs/pdal-build/bin/cc CXX=/srv/conda/envs/pdal-build/bin/c++
cmake -G Ninja -DCMAKE_LIBRARY_PATH:FILEPATH="$CONDA_PREFIX/lib" -DCMAKE_INCLUDE_PATH:FILEPATH="$CONDA_PREFIX/include" -DBUILD_PLUGIN_HDF=ON ..
ninja