Skip to content

Use firedrake-rtree for spatial indexing#4981

Draft
leo-collins wants to merge 26 commits intomainfrom
leo/rust-rstar
Draft

Use firedrake-rtree for spatial indexing#4981
leo-collins wants to merge 26 commits intomainfrom
leo/rust-rstar

Conversation

@leo-collins
Copy link
Contributor

@leo-collins leo-collins commented Mar 20, 2026

Description

Use firedrake-rtree for spatial indexing.

  • This is an order of magnitude faster than libspatialindex for querying points.
  • We can now build a one dimensional spatial index, allowing us to remove a whole load of special-cased code.
  • We can now access the nodes of the tree and manually traverse it. This will be used to build a distributed rtree which will allow us to use sparse communication operations to build the VertexOnlyMesh, instead of the expensive allgathers we use currently.

size_t nids = 0;
err = rtree_locate_all_at_point((const struct RTreeH *)f->sidx, x, &ids, &nids);
if (err != Success) {
fputs("ERROR: RTree_LocateAllAtPoint failed in rstar-capi!\n", stderr);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
fputs("ERROR: RTree_LocateAllAtPoint failed in rstar-capi!\n", stderr);
fputs("ERROR: rtree_locate_all_at_point failed in rtree-capi!\n", stderr);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant