logo separator

[mkgmap-dev] [PATCH v2] Move maxspeed calculations to style file

From WanMil wmgcnfg at web.de on Fri Aug 30 21:19:43 BST 2013

> Felix> only downwards, is what everyone expects, but not what mkgmap did
> Felix> so far. I critisized this quite often in the past....
>
> Thanks Felix - that's what I wanted to know.  I obviously overlooked
> your previous complaints!
>
> The style rules you present do look quite unwieldy - perhaps it's
> possible to simplify by setting initial defaults, and using those to
> allow revising downwards:
>
> /--------
> | highway=motorway { add mkgmap:road-speed-class = 7 }
> | highway=trunk    { add mkgmap:road-speed-class = 6 }
> | ...
> |
> | maxspeed:practical=* { set maxspeed=${maxspeed:practical} }
> |
> | maxspeed=* & mkgmap:road-speed-class > 1 & maxspeedkmh() <=  5
> |   { set mkgmap:road-speed-class = 1 }
> | maxspeed=* & mkgmap:road-speed-class > 2 & maxspeedkmh() <= 20
> |   { set mkgmap:road-speed-class = 2 }
> | ...
> \--------
>
> Is there any reason why that wouldn't work?

Should work.
As I answered Felix I will come back later on to improve the default 
maxspeed rules.

WanMil



More information about the mkgmap-dev mailing list