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

Zoom zero tile substitution #31

Merged

Conversation

zerebubuth
Copy link
Member

Use "lower zoom" tiles within the zoom 0 metatile as substitutes for lower zoom tiles.

For example, if a we have a global build with metatile size 8x8, this means that the metatile zoom offset is 3, so the 256px tiles in the 0/0/0 metatile are actually tiles at zoom level 3. Changes requested in tilequeue would mean generating the tiles at lower zoom levels too, allowing us to use the +0/0/0 offset in the 0/0/0 metatile to respond to the 0/0/0 request.

This approach means we'll always be able to answer a request for at least one tile size at coordinate zoom 0 (i.e: a tile covering the whole world). The nominal zoom will depend on the tile size which is configured. If we configure 512px tiles, then 0/0/0 will be a nominal zoom 1 tile.

@zerebubuth zerebubuth requested review from rmarianski and iandees July 5, 2018 08:57
We don't generate metatiles with negative zoom levels, so when we get a request which would cause us to request a negative zoom metatile, we adjust the offset to keep the metatile zoom at zero. Previously, we were just clamping the metatile and offset to `0/0/0`, but as we make larger metatiles this no longer works for low zooms.
@zerebubuth zerebubuth force-pushed the zerebubuth/zoom-0-meta-and-offset branch from aa83bf9 to f1df8d9 Compare July 5, 2018 09:04
@zerebubuth zerebubuth merged commit c45f745 into tilezen:master Jul 5, 2018
@zerebubuth zerebubuth deleted the zerebubuth/zoom-0-meta-and-offset branch July 5, 2018 15:54
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

Successfully merging this pull request may close these issues.

3 participants