logo separator

[mkgmap-dev] levels in style aren't processed correctly

From Steve Ratcliffe steve at parabola.me.uk on Wed May 20 13:09:52 BST 2015

Hi Andrzej

>  > I don't understand this.  If you have no --levels option then the
>  > default should be used, which has a maximum of 4.
>
> Looks like there is no defaults now, or maybe only level 0 gets a
> default resolution.

There is a default for levels:

   DEFAULT_LEVELS = "0:24, 1:22, 2:20, 3:18, 4:16"

There is not a default for overview-levels, although an overview level
is constructed based on the highest level in 'levels'.

>  > What do you think that the message text should be?
>
> Maybe something like "'level 1' is used in style while its resolution is
> not defined in option 'levels=' nor "overview-levels=".

OK.

>  > What are the conditions to cause this error?

> My previous analysis was wrong. This is what I'm doing:
> - I have modified default style changing some "resolution xx" to "level
> 0", "level 1" or "level 2".
> - I have commented "levels=" and "overview-levels=" in "options" file.
>
> Now I run compilation with following command line options:
> 1) --levels=0:22,1:21,2:20 --gmapsupp --no-tdbfile
> 2) --levels=0:22,1:21 --gmapsupp --no-tdbfile
> 3) --levels=0:22,1:21 --overview-levels=4:16 --gmapsupp --no-tdbfile
>
> Compilation 1) goes correctly.
> Compilation 2) ends with an error.
> Compilation 3) creates a map.

Oh I see now.  In case 2 the highest level is 1, whereas in 3) the
max level is 2, since the normal and overview levels are combined.

I can change this so that a level 2 would translate to the resolution
of the level less than or equal to it.

..Steve


More information about the mkgmap-dev mailing list