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

mvt: handling south- and west-positive projection system #62

Open
ear7h opened this issue Aug 21, 2019 · 0 comments
Open

mvt: handling south- and west-positive projection system #62

ear7h opened this issue Aug 21, 2019 · 0 comments

Comments

@ear7h
Copy link
Contributor

ear7h commented Aug 21, 2019

mvt.PrepareGeometry (and mvt as whole) was written to be srid agnostic, but the follwing lines would fail in the edge case that the projection had axis oriented differently from the common web mercator and lat/longs, such as:

These types of coordinate systems are also refered to as Lo coordinate systems.

The following lines are relevant the mvt code:

px := int64((g.X() - tile.MinX()) / tile.XSpan() * pixelExtent)
py := int64((tile.MaxY() - g.Y()) / tile.YSpan() * pixelExtent)

However, I think the change would need a new or re-designed types. One thing that comes to mind is tweaking the Extent elements to be left, top, right, bottom instead of min/max X/Y. This would not require any changes under our current assumptions in tegola of only using epsg 3857 and 4326.

Here are some relevant links to discussions on this topic:

https://community.esri.com/thread/185667-why-is-the-projection-upside-down
https://isis.astrogeology.usgs.gov/IsisSupport/index.php?topic=370.0
http://www.ngi.gov.za/index.php/technical-information/geodesy-and-gps/datum-s-and-coordinate-systems

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