https://pdal.io/stages/filters.voxelcenternearestneighbor.html#filters-voxelcenternearestneighbor
The VoxelCenterNearestNeighbor filter is a voxel-based sampling filter. The input point cloud is divided into 3D voxels at the given cell size. For each populated voxel, the coordinates of the voxel center are used as the query point in a 3D nearest neighbor search. The nearest neighbor is then added to the output point cloud, along with any existing dimensions.
Notice the red dots are much more sparse than the gray intensity dots. Red dots are separated 1.0 meters and gray are 0.1 meters.
To generate this I did converted with PDAL and then used Potree to visualize.
pdal pipeline $HOME/voxcnn-1.0.json
voxcnn-1.0.json
[
"801403-802580-2493384-2494335.laz",
{
"type":"filters.voxelcenternearestneighbor",
"cell":1.0
},
"801403-802580-2493384-2494335-voxelcenternearestneighbor-1.0.laz"
]
-rw-rw-r-- 1 jsun jsun 65M Apr 11 21:01 801403-802580-2493384-2494335-voxelcenternearestneighbor.laz
-rw-rw-r-- 1 jsun jsun 8.1M Apr 11 21:04 801403-802580-2493384-2494335-voxelcenternearestneighbor-1.0.laz