Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generalization to 3 dimensions #14

Closed
martinResearch opened this issue Jan 9, 2021 · 3 comments · Fixed by #15
Closed

generalization to 3 dimensions #14

martinResearch opened this issue Jan 9, 2021 · 3 comments · Fixed by #15

Comments

@martinResearch
Copy link

Hi,
Thank you for this nice work.
I love the fact it support batch query (unlike rtree Toblerity/rtree#178).
It would be great if it could support 3 dimensions (or maybe even n dimensions if that does not impact the speed). Does that seem easily feasible ?
This could then potentially be used in the trimesh library to speed thing up and solve issue mikedh/trimesh#1116

@atksh
Copy link
Owner

atksh commented Jan 12, 2021

Hi,

It is feasible, but not easy due to the implementation of this library. This is because the four real numbers representing a two-dimensional rectangle are stored as fixed-length vectors in order to use SIMD. Plus, the building method of the Priority R-tree depends on the dimensions.

Another way to build a 3d-prtree may be to use three 2d-prtrees, like xy, yz, zx projection planes. The query result could be the intersection of the three results. This can be implemented by c++.

@martinResearch
Copy link
Author

ok, thank for the explanation! I believe it would need to be a real 3d rtree to allow efficient queries

@atksh atksh closed this as completed Jan 14, 2021
@atksh atksh linked a pull request May 23, 2021 that will close this issue
@atksh
Copy link
Owner

atksh commented May 23, 2021

@martinResearch
It may be too late for you, but 3D Priority-RTree is now supported. Potentially any dimension can be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants