mapchete icon indicating copy to clipboard operation
mapchete copied to clipboard

Off by one zoom level

Open normanb opened this issue 10 months ago • 1 comments

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.

normanb avatar Feb 23 '25 23:02 normanb

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?

ungarj avatar Mar 25 '25 07:03 ungarj