-
Notifications
You must be signed in to change notification settings - Fork 57
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
Antimeridian Crossings and bbox #198
Comments
A potential solution would be to require that for a AM crossing geometry, the bbox.xmin is in the range [0,180], and add +360 to the bbox.xmax so that it is in the range [180,360]. (the x of the geometries themselves could/should still be in the [-180,180] range) |
@kylebarron is that the same as what you suggested in the meeting two weeks ago (adding 360 to the xmax value)? While that fixes the issue with the "wrong" rowgroup-level xmax value, how does this work for filtering based on the bbox column itself? Assume you are reading with a bbox filter of [-180, -10, -170, 10]. Using simple x/y min/max comparisons for the bbox, such a filter would also not select the row with the A-M crossing, because that bbox now doesn't overlap with [170,-10,190,10] |
True, and I'm pretty sure there is no simple/elegant solution as soon as discontinuities are involved :-) |
The other option would be to step away from GeoJSON's wording using the "most southwesterly point (min) and most northeasterly point (max)" ? |
Do we want to try to do anything here for 1.1? The spec now says:
That seems sufficient to me for now, so I'm going to move the milestone for this out, unless someone wants to tackle something for 1.1 |
Discussed on call 6/3/24 - @jorisvandenbossche proposal above seems better since the filter would always be 'correct', so he's going to check what GDAL does / make a PR to discuss. Seems like it'd be clearer in the spec to do this. |
I like the idea of using strictly a min/max of coordinates (which implies that edges are not permitted to cross the antimeridian for lon/lat coordinates with planar edges)! |
I think I was confusing the case of a split vs non-split geometry (i.e. a geometry that is represented by a Multi geometry cut into two pieces by the antimeridian, vs an actual single geometry where the vertices cross the antimeridian). For GeoPandas' use cases, where geopandas does not support geographical coordinates properly (just regard them as cartesian, so for geopandas a line is never crossing the antimeridian, and thus in practice you can only work with split geometries in geopandas), saying to use simple min/max values is fine (and matches with what we currently do). But for systems that do support proper geographical coordinates (with edges=spherical) with lines crossing the antimeridian, we ideally still need a solution (other than saying this is not supported)? (or follow GeoJSON rfc7946 spec to say that such geometries SHOULD be cut?) |
I don't think those systems will ever export a bounding box column (because it is computationally expensive to do so in addition to making no sense). There is also no way to compute this (s2's latlngbounder will only get you a GeoJSON-style southwest/northeast bbox). An s2 or h3 covering would be the method for pushing down a "may intersect" query (and there's no need to consider that until we have a system that can actually read/write those...I'm working slowly on doing this in R!) |
As mentioned in #191 in #191 (comment), geometries that cross the antimeridian will break the current row group filtering mechanics.
Our solution is just say antimeridian crossings are unsupported but we can use this thread to discuss solutions.
The text was updated successfully, but these errors were encountered: