[Routing] monav, Mapnike render generates huge and fixed-sized index file.

VeaaC FDIRCT veaac.fdirct at gmail.com
Thu Sep 16 17:30:10 BST 2010


Hi,

On Thu, Sep 16, 2010 at 11:15 AM, feverzsj <feverzsj at hotmail.com> wrote:
>
> hi, list
>  I tried preprocessing the
> china.osm(http://downloads.cloudmade.com/asia/china#downloads_breadcrumbs)
> with Mapnike render plugin. The plugin is set to render to zoom level 13(the
> maximum zoom level is also 13, greater values will generate larger zoom
> level with most of the tiles being missed.)
>  It seems that monav uses a direct index scheme, the length of index file
> is always fixed based on the zoom level (16 * 4^zoom (byte)). For example,
> zoom level 13 will generate a 1GB index file, while the tile file could be
> much smaller.
>  Is it possible for monav to switch to some space partitioning algorithm
> based solution(e.g. quard tree). Since the index file contains too many
> redundant data.
>  NaviComputer(http://navicomputer.com/index.php) is able to pack and use
> osm tiles of any selected levels from any specified area, while the file
> size is changed based on the area size and zoom levels.

The MapnikRenderer plugin of MoNav uses an index containing entries
only for tiles in the bounding box of the rendered area. This suffices
for most areas. Using a space partitioning data structure does not
bring much benefits due to the introduced overhead. It would only save
storage space for largely unmapped areas.

The fact that your index file takes up 1GB - 2^13*2^13*16Byte - is
most likely caused by the wrong settings. MoNav has a settings for the
maximum zoom level to be rendered as well as a settings to render *the
whole world* down to a specified zoom level. My guess is that you
specified a zoom level of 13 for both settings, extending the rendered
area from China to the whole world for every zoom level involved.

Normally the index file is much smaller than the tile file, e.g.,
rendering Germany, zoom level 15, index file size ~15MB. I advise to
render the whole world done to level 6 for a nice overview, but not
much further as it will use up 2^zoom * 2^zoom * 16 Bytes for the
index. As a maximum zoom level I would advice at least 14, better 15
as you cannot distinguish individual streets with a smaller zoom
level. The index file size should not be a problem, though, and is by
far overshadowed by the tile file.

If you do not have set the "render the whole world down to level x"
setting to 13, there might be a problem with the bounding box
specified in your OpenStreetMap data set. If this is the case, would
you provide me with the header of your .osm file to check it? Maybe
MoNav misinterprets the bounding box.

> It will be great if
> monav can also generate and use tiles of specified zoom levels rather than
> begin with zoom level 0.

I might implement that, but the benefits are not that great. Rendering
all zoom levels takes only half of the storage space of the deepest
level, e.g., Germany, zoom level 15 3,2GB, zoom level 1-14 1,8GB -
56%. Restricting yourself to the two deepest levels takes about 4.4GB,
about 88% of the overall size.

Greetings

Christian Vetter



More information about the Routing mailing list