DenisCarriere / geojson-rbush

GeoJSON implementation of RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles
MIT License
70 stars 14 forks source link

About managing 180th meridian and poles crossing #7

Open ThomasG77 opened 5 years ago

ThomasG77 commented 5 years ago

More a question than a real issue.

I'm playing with WFS 3.0 and your library and I'm not sure about this use case for the bbox.

In the compliance tests, I need to be able to manage when a polygon is crossing either 180th meridian or poles https://github.com/opengeospatial/ets-wfs30/blob/master/src/main/java/org/opengis/cite/wfs30/collections/GetFeaturesOperation.java#L123-L126 To deal with these cases, I'm wondering if I need to split my polygon crossing the meridian or the pole, get two polygons, run both tree.search(poly1) and tree.search(poly2), dedupe and merge in one GeoJSON or does Rbush and GeoJSON-RBush can manage it another way? Thanks for any input.

Tmodurr commented 4 years ago

@ThomasG77 did you ever get an answer for this?

I'm assuming you'll need to split based on experience