[pdal-commits] [PDAL/PDAL] 15d45d: Limit VoxelCentroidNearestNeighbor results to poin...

chambbj noreply at github.com
Thu Sep 5 08:43:41 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/PDAL/PDAL
  Commit: 15d45d4404c561b2283bfa61fc651d6944bf0dcd
      https://github.com/PDAL/PDAL/commit/15d45d4404c561b2283bfa61fc651d6944bf0dcd
  Author: chambbj <brad.chambers at gmail.com>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    M doc/stages/filters.voxelcentroidnearestneighbor.rst
    M filters/VoxelCentroidNearestNeighborFilter.cpp

  Log Message:
  -----------
  Limit VoxelCentroidNearestNeighbor results to points within voxel (#2703)

* 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.

* Avoid errors on Windows with max

* Doc update only

Document rules for how points are selected within each voxel.

Remove reference to filters.voxelgrid, which no longer exists.

* Do not calculate bounds, just use first point as offset




More information about the pdal-commits mailing list