logo separator

[mkgmap-dev] mkgmap:road-speed-class vs. road_speed?

From WanMil wmgcnfg at web.de on Sun Dec 29 13:47:21 GMT 2013

Hi Thorsten,

the road speed assignment of a road is performed as follows:

1) Use road_speed from the element definition (7 in your example)
2) If mkgmap:road-speed-class is set use this value instead
3) If mkgmap:road-speed is set use this value instead if it is a number 
only. If it starts with + or - modifiy the value retrieved in 1) and 2). 
Also limit this value to mkgmap:road-speed-min/max if applicable.

So for your example road speed=4 is used for a motorway with maxspeed > 
60kmh. Road speed=7 is used for all motorways with no maxspeed or 
maxspeed <= 60kmh.

As you can see road_speed in the element type definition works as 
default value. It is not possible to check if the road_speed is set in 
the element type definition.

WanMil

>
> Hi,
>
> I have a question about mkgmap:road-speed-class and the
> road_speed/road_class elemets.
>
> The documentation only writes that "mkgmap:road-speed-class"
> overrides "road_speed".
> But if I use "road_speed", what does this mean for
> "mkgmap:road-speed-class"?
>
> Example:
>
> highway=motorway                [0x01 road_class=4 road_speed=7 level 3]
> maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() >  60 { set mkgmap:road-speed-class = 4 }
>
> Will the second rule overwrite the first one?
> If yes, how can I check if road_speed was already set or not?
> If not, will the second rule have ever any affect?
>
> This construct is used in the default mkgmap style, setting
> road_class/road_speed in the action block, and later according
> to maxspeed in inc/roadspeed.
>
> Thanks,
>    Thorsten
>
>



More information about the mkgmap-dev mailing list