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

Off by one zoom level #669

Open
normanb opened this issue Feb 23, 2025 · 1 comment
Open

Off by one zoom level #669

normanb opened this issue Feb 23, 2025 · 1 comment

Comments

@normanb
Copy link

normanb commented Feb 23, 2025

I am processing DEMs at zoom level 14. I print the following in my processing function;

print(f"res {dem.tile.transform}")

with a definition of

zoom_levels: 14

pyramid:
    grid: mercator
    pixelbuffer: 2
    metatiling: 1

And I see

| 0.00,-9.55, 4752567.78|
| 0.00, 0.00, 1.00|

So a pixel size of ~9.55 metre which is zoom level 13 at the equator if I am following https://docs.mapbox.com/help/glossary/zoom-level/

It seems that the zoom level reading is off by one.

@ungarj
Copy link
Owner

ungarj commented Mar 25, 2025

Sorry for the late reply! I think the root of the issue is that Mapbox GL uses a tile size of 512x512 pixels, whereas the default tile pyramid uses 256x256.

Have you tried using tile_size: 512 in the pyramid setting?

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

2 participants