Modify

#11987 closed Bugs (fixed)

Cannot find any way remove from an rtree if using a geographic type

Reported by: vin <vindoctor2@…> Owned by: awulkiew
Milestone: Boost 1.61.0 Component: geometry
Version: Boost 1.60.0 Severity: Showstopper
Keywords: rtree geographic remove Cc:

Description

I cannot find any supported way to remove objects from an rtree using a 2d geographic type. I do see where Cartesian 2d works. No matter what method I try, it compiles with unsupported. I would like to remove as fast a possible, but I cannot even seem to find a way to search the whole rtree by values (instead of bounds and a value) to remove something. Maybe an rtree with geographic types is really experimental and not ready to be used?

Attachments (0)

Change History (2)

comment:1 Changed 21 months ago by Barend Gehrels

Owner: changed from Barend Gehrels to awulkiew

comment:2 Changed 21 months ago by awulkiew

Milestone: To Be DeterminedBoost 1.61.0
Resolution: fixed
Status: newclosed

It's because some required operations was not implemented for this CS. In this case (remove()) covered_by() was not implemented. It should be fixed in 1.61 at least for Points and Boxes, see:

https://github.com/boostorg/geometry/pull/345

This bug should also be fixed in develop and master branches so you could pick the library from the repository if you need it now.

Furthermore, some other algorithms might not work correctly for some cases in 1.60, e.g. when an rtree spanned across more than a half of a globe (bounds width >= 180deg) or when stored boxes could cross antimeridian (e.g. longitude min-max = 170-190). So spatial predicates might not work correctly in such cases.

So yes, it basically means that in 1.60 you could e.g. calculate boxes with bg::envelope() in geographic but then convert boxes to cartesian and store them in the rtree. And if you know that boxes could cross antimeridian perform some of the queries near the antimeridian 2 times, one for negative coordinates near -180 and the second one for corresponding coordinates greater than 180.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain awulkiew.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.