tilemill-project / tilemill

TileMill is a modern map design studio
https://tilemill-project.github.io/tilemill/
BSD 3-Clause "New" or "Revised" License
3.12k stars 528 forks source link

Incorrect Y value in exported mbtiles #2745

Closed Yewsea closed 3 years ago

Yewsea commented 3 years ago

Yesterday, after exporting mbtiles and uploading them into my project, I was annoyed to find out that they weren't being loaded correctly. Upon investigation, I discovered that the mbtiles had exported the incorrect Y values. For example, the tile that should have been 255, 171, 9, was exported as 255, 341, 9. As a result, my map attempts to load tiles from far away.

I am unaware of any settings that might have caused this issue

My guess is Tilemill is confusing the positive and negative values for longitudes

csytsma commented 3 years ago

@Yewsea Can you provide more details:

Yewsea commented 3 years ago

On further research, it appears the cause is there being multiple versions of how tiles are laid out, such as TMS and XYZ. Tilemill saves as TMS but the library I was using didn't.

I've found a script that can switch them, but it would be nice to have an option to set the format

csytsma commented 3 years ago

If you can provide more details on that, perhaps the Mapnik command to change, should be fairly easy to implement.

On Jun 16, 2021, at 1:44 PM, Yewsea @.***> wrote:

On further research, it appears the cause is there being multiple versions of how tiles are laid out, such as TMS and XYZ. Tilemill saves as TMS but the library I was using didn't.

I've found a script that can switch them, but it would be nice to have an option to set the format

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tilemill-project/tilemill/issues/2745#issuecomment-862710408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7ORDD7Q46XTEDEPEWVM3TTEELRANCNFSM46Y6KNKA.