Skip to content

Clarity on query documentation #910

Answered by awulkiew
jpan127 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, so I see you're storing some Objects in the R-tree and then using query iterator in order to get all of the elements of the query at once.

Depending how big the Object is it is ok to store them in the R-tree or not. It's because Values stored in the R-tree can be copied during insert(), tree creation in general or when values are returned by the query() method. So if Objects are e.g. polygons it would be better to store them in e.g. a separate container and then in the R-tree store pairs of bounding boxes of polygons with IDs of polygons (index in a vector, iterator in a set, etc.). You could use Boost.Range adaptors to avoid intermediate step of creating a container of R-tree element…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by awulkiew
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #753 on September 28, 2021 22:43.