You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a new lib/octree/ spatial indexing library for 3D points. The octree recursively subdivides space into octants with adaptive subdivision and a depth limit for coincident points. It supports point insertion, axis-aligned range queries, depth-limited traversal, cached subtree point counts, and subtree centroids.
The areas I was thinking about when writing this are, but I'm sure there are many other use cases as well.
LiDAR ingest (v.in.pdal)
v.vol.rst
spatial decimation (v.decimate)
level-of-detail (LOD) rendering of point clouds in the NVIZ GUI, where loading everything into memory currently bogs the system down.
How about adding some id to OctreePoint3D? With such an id, it would be easy to retrieve the corresponding points together with any attributes from the actual points vector when querying the octree. Or is this covered with any provided user_data?
How about adding some id to OctreePoint3D? With such an id, it would be easy to retrieve the corresponding points together with any attributes from the actual points vector when querying the octree. Or is this covered with any provided user_data?
@metzm you're right, user_data doesn't cover it. It's a per-query callback parameter, not a per-point attribute, so there was no way to map a queried point back to its source. I added a caller-defined grass_int64 id to OctreePoint3D that can be set to a vector cat or a source index or leave it OCTREE_NO_ID.
Are you using it for something specific now? Do you plan to integrate the library into one of the suggested tools?
Yes. The octree will be used for new 3D tiling capabilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a new
lib/octree/spatial indexing library for 3D points. The octree recursively subdivides space into octants with adaptive subdivision and a depth limit for coincident points. It supports point insertion, axis-aligned range queries, depth-limited traversal, cached subtree point counts, and subtree centroids.The areas I was thinking about when writing this are, but I'm sure there are many other use cases as well.