
Hi Gerd, it would be possible to print a warning (implemented in the addtagaction) but maybe it is better to add a new action like highway=secondary {set mkgmap:road-speed=3} highway=* & surface=gravel { modroadspeed=-1} highway=* & tunnel=yes { modroadspeed=-1} The modroadspeed action implements adding the values to the mkgmap:road-speed tag. WanMil
Hi WanMil,
okay, now I got it. Would it be possible to print a warning when a style uses something like highway=secondary {set mkgmap:road-speed=3} highway=* & surface=gravel {set mkgmap:road-speed=-1} highway=* & tunnel=yes {set mkgmap:road-speed=-1}
For a way with highway=secondary,surface=gravel,tunnel=yes the resulting speed would be 2 (3-1), but the user probably expects 1 (3-1-1).
Gerd
Date: Sat, 28 Dec 2013 10:52:54 +0100 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] why do we have mkgmap:road-speed-class ?
lines: include 'inc/roadspeed'; highway=* & lanes > 2 { set mkgmap:road-speed=+1 }
The roadspeed include sets the road speed. After that you need a 2nd tag to modify the road speed.
WanMil
Hi WanMil,
I still don't understand. Please give an example where mkgmap:road-speed-class has to be used because mkgmap:road-speed will not work.
Gerd
Date: Sat, 28 Dec 2013 09:20:20 +0100 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] why do we have mkgmap:road-speed-class ?
Hi WanMil,
I fear I don't understand the meaning of this new tag. Docu says: "A value between 0 and 7. Overrides the road_speed definition in the element type definition if this tag is set."
We have mkgmap:road-speed which allows to increment, decrement or override the road speed value in the element type definition. Why did you introduce this new tag?
mkgmap:road-speed already was already used so I could not just change its meaning. mkgmap:road-speed-class defines the speed classification whereas mkgmap:road-speed can define or modify a speed classification. But how do you want to modify an already set classification? That's not possible in the style because you don't have arithmetic expressions. That results in having mkgmap:road-speed-class which defines speed class (or better overrides the class defined in the GType) and a modifier mkgmap:road-speed. I propose to use mkgmap:road-speed as modifier only (prefixed with +-) but I could not remove the usage without prefixed +- because that would break existing style sheets.
WanMil
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev