Modify

Ticket #11987 (closed Bugs: fixed)

Opened 14 months ago

Last modified 13 months ago

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

Change History

comment:1 Changed 13 months ago by barendgehrels

  • Owner changed from barendgehrels to awulkiew

comment:2 Changed 13 months ago by awulkiew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from To Be Determined to Boost 1.61.0

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.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.