-
Notifications
You must be signed in to change notification settings - Fork 17
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
In VectorTile.cpp the wrong latitudes are calculated. #1
Comments
There is something weird going on... in openmaptiles.org tiles, Cairo is in 14/9613/9626 but in mapbox.com, it is 14/9613/6757... I need to have a think. Update: As far as I can tell, the origin of tiles for mbtiles format is in the bottom left or south west (from a TileMill generated PBF, following the Tile Map Service Specification). However, for tile URLs the origin is in the top left/north west (following the google tiles convention). More info on the OSM wiki. Looks like I am worrying over nothing! |
Fix committed to master. Thx @Serinox! |
Currently Cairo Egypt (specifically tile 9613,9626,14) is being calculated at roughly latitude -30 in the example project. I think this is due to a difference between the mbtile specification and the slippy tile spec that the tiley2lat and lat2tiley are expecting.
The mbtile format uses the "Tile Map Service Specification" which has incompatible tile indexing with slippy map tiles. The latitude functions seem to work when modified to be as follows:
these modifications were found here https://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates/
With the above changes Cairo is back at roughly latitude 30 comfortably above the equator.
The text was updated successfully, but these errors were encountered: