zoom-interval-conf

356 views
Skip to first unread message

Sebastian Fischer

unread,
Mar 21, 2012, 5:09:02 PM3/21/12
to mapsfo...@googlegroups.com
Hi,

the advanced options for the mapfile-writer [1] mention the parameter zoom-interval-conf to "configure the zoom intervals". However, there is no explanation what zoom intervals are (I could not find an explanation on Google either). I noticed that the mapfile size varies when using different zoom intervals but I am unsure about other consequences of this setting, for example for rendering. Can somebody clarify?

Thanks,
Sebastian

Karsten Groll

unread,
Mar 21, 2012, 6:22:12 PM3/21/12
to mapsfo...@googlegroups.com
Hello Sebastian,

it looks like, the wiki page explaining the idea of the map format has
been deleted. So you have to live with the short explanation:

Zoomlevel 0 covers the whole world within one single tile. If you zoom
in one step you get four tiles covering the whole world. If you zoom
in to zoom level n you get 4^n tiles. (This behaviour should be well
known from slippy maps.)

As it would be too expensive to store data for each zoom level, data
is only stored in tiles of specific zoom levels, called "base zoom
levels" (bzl). By default, data is stored in tiles of bzl 8 and bzl
14.

Example: If you want to render an image tile on zoom level 16, there
is no zoom level 16 data tile to get data from. Instead you have to
load the bzl 14 data tile, that contains the level 16 tile's data. One
bzl 14 tile contains data for 4^2 level 16 tiles (see formula above).
On the other hand you have to read several bzl tiles if you intend to
render a tile with a lower zoom level.

This becomes problematic if you zoom out very far because you have to
read O(4^n) tiles. That's why zoom intervals have been introduced. All
data within one base zoom interval is read from its base zoom level.
By having different intervals you can divide data in major and minor
road for example.

Zoom interval configurations should not impact visual results. (Thats
what the render themes and tag config files are for.) They do only
affect file sizes and loading times. Adding intervals increases the
file size but reduces loading times for zoom levels that are not base
zoom levels. The selection of base zoom level leads to bigger tile
sizes and longer loading times, but does also lead to smaller files
(the tiles are bigger, but there are lesser tiles).

I hope this helps. If something is still unclear, feel free asking.

Regards,

Karsten

2012/3/21 Sebastian Fischer <federigo....@gmail.com>:

Sebastian Fischer

unread,
Mar 22, 2012, 3:54:58 PM3/22/12
to mapsfo...@googlegroups.com
Hello Karsten,

thanks for your helpful explanation!

It seems that when creating a mapfile for a restricted region (say a single city) using a bounding box, then it is reasonable to change the zoom-interval-conf. For example, if the whole area is visible at zoom level 10, then there is no need to include base zoom levels for lower zoom levels, right?


Zoom interval configurations should not impact visual results. (Thats
what the render themes and tag config files are for.) They do only
affect file sizes and loading times. 

What if I specify a zoom-interval-conf that does not include very high zoom levels? For example, if icons for bus stops are configured to appear from zoom level 16 and higher but I specify zoom-interval-conf=12,10,14. Will the bus stop logos still be rendered at zoom level 16? What if I specify zoom-interval-conf=13,10,16? Are bus stops excluded because they do not appear at the base zoom level 13?

I noticed that zoom levels that are smaller than the smallest min zoom level or larger than the largest max zoom level are still rendered. Are the min and max zoom levels used for something else than deciding which base zoom level to use for rendering?

Thanks!
Sebastian

Reply all
Reply to author
Forward
0 new messages