[pdal-commits] [PDAL/PDAL] 075f8d: Limit VoxelCentroidNearestNeighbor results to poin...
chambbj
noreply at github.com
Thu Aug 29 10:16:23 PDT 2019
Branch: refs/heads/issue-2664
Home: https://github.com/PDAL/PDAL
Commit: 075f8d4447c65115e8850d9eeed1137bfbad5487
https://github.com/PDAL/PDAL/commit/075f8d4447c65115e8850d9eeed1137bfbad5487
Author: Bradley J Chambers <brad.chambers at gmail.com>
Date: 2019-08-29 (Thu, 29 Aug 2019)
Changed paths:
M filters/VoxelCentroidNearestNeighborFilter.cpp
Log Message:
-----------
Limit VoxelCentroidNearestNeighbor results to points within voxel
Previously, VoxelCentroidNearestNeighbor could return points outside the
current voxel. This happened because we search a global KDIndex for the nearest
neighbor of the voxel centroid, which could in fact come from a neighboring
voxel.
The refactored implementation ensures that we are only considering neighbors
within the current voxel when determining which neighbors is nearest the
centroid.
Furthermore, this refactor also addresses some special cases, namely voxels
containing only one point (it simply passes through), and those containing two
points which by definition are equidistant to the centroid. In this case, we
revert to the VoxelCenterNearestNeighbor approach and select the point that is
closest to the voxel center.
More information about the pdal-commits
mailing list