Skip to content

Octree review - #7441

Closed
ArthPatel1502 wants to merge 8 commits into
OSGeo:mainfrom
ArthPatel1502:octree-review
Closed

ArthPatel1502 wants to merge 8 commits into
OSGeo:mainfrom
ArthPatel1502:octree-review

Conversation

@ArthPatel1502

Copy link
Copy Markdown
Contributor

This updates the OctreePoint3D struct to include a user_data tracking pointer, allowing downstream GRASS vector modules to link attributes directly to spatial nodes.

@github-actions github-actions Bot added CI Continuous integration C Related code is in C libraries docs tests Related to Test Suite CMake labels May 29, 2026
Comment thread lib/octree/octree.h
/* Point structure */
typedef struct {
double x, y, z;
void *user_data; /* Arbitrary user pointer to attach point IDs or metadata */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pre-commit] reported by reviewdog 🐶

Suggested change
void *user_data; /* Arbitrary user pointer to attach point IDs or metadata */
void
*user_data; /* Arbitrary user pointer to attach point IDs or metadata */

@cwhite911

Copy link
Copy Markdown
Contributor

@ArthPatel1502 thanks for the interest here. This PR includes the commits from #7324 and targets the same new lib/octree, so it duplicates that open PR. The specific idea, linking per-point attributes back to source records, is already being handled there: #7324 adds a grass_int64 id to OctreePoint3D for exactly that. I'm going to close this one to keep the discussion in one place. If you'd like to weigh in on the design (id vs. a user_data pointer), a review or comment on #7324 is very welcome.

@cwhite911 cwhite911 closed this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Related code is in C CI Continuous integration CMake docs libraries tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants