[OSM-dev] Optimizing map tile trees

AJ Ashton aj.ashton at gmail.com
Sat Aug 20 02:59:58 BST 2011

> ... For instance,  if I
> generate a level 16 tile that is a gray "Empty Tile", does it mean when I
> generate level 17, and I am generating the four level 17 tiles that
> correspond to that one level 16 tile, that those four tiles will also be
> gray "Empty Tile", and the same for the 16 sub-tiles at level 18? Or, in
> contrast, is it possible for features that weren't visible in the level 16
> tile to "appear" in that area at level 17 or level 18? Another way of saying
> it: Does "Empty Tile" mean that the tile is "empty all the way down"?

This of course depends entirely on how you have written the style
definitions. Even if they are designed such that no new features are
defined at subsequent zoomlevels starting at a certain scale (and I'm
quite sure that the Mapnik XML powering OSM.org tiles is not designed
this way), it would be difficult to determine whether an empty tile is
really "empty all the way down".

You would still have situations where new objects are rendered due to
different collision detection results at different scales. Say Mapnik
prevented a label or something from being rendered on a tile at zoom
level 16 because of another nearby label and it happened to result in
an empty tile. Zoom in to 17, the scale is different and there is no
longer a collision and a piece of the previously-unrendered label
could render on a sub-tile of an empty tile.

Avoiding this would probably require separate check of the full data
for each tile, including a buffer region around the tile. Or perhaps
this could be a rare enough situation that a few cut-off labels and
icons are a reasonable risk.

AJ Ashton

More information about the dev mailing list