Skip to content
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

GeoboxTiles.tiles gives wrong results for global inputs #87

Open
Kirill888 opened this issue Apr 29, 2023 · 0 comments
Open

GeoboxTiles.tiles gives wrong results for global inputs #87

Kirill888 opened this issue Apr 29, 2023 · 0 comments

Comments

@Kirill888
Copy link
Member

GeoboxTiles.tiles takes in a geometry in any projection and returns an iterator over tiles that overlap with the given geometry. In order to do that, it first needs to project input shape into a CRS native to GeoboxTiles. This breaks down when source shape covers area way outside of the valid region of the destination CRS, as a result instead of returning all the tiles nothing is returned at all. Essentially this step Geometry@crs1 -> BoundingBox(Geometry@crs2) produces wrong results, this is especially common when source image has "global coverage" and destination CRS has a limited range like epsg:3577 for example.

What's needed is a robust "bounding box of a geometry in some other projection method", that does not slow down the common case where source shape is in a safe region for coordinate transformation. Ideally we would also have a "robust to_crs method for polygons" that would safely clip sections of the source geometry that are outside of the valid range of transform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant