
Am Freitag, 13. März 2015, 14:08:45 schrieb Andrzej Popowski: Hi
Hi Bernd,
first question, what should this rule do? maxspeed=* & maxspeedkmh()!=* { delete maxspeed }
This rule deletes tag "maxspeed" if we can't assign a numeric value to it.
got this answer a few hours ago while testing this against my style, it's clear now. btw, found many values like 30_mph with Taginfo, are they removed by this rule,too? IMHO they keeped, but rewritten to usable values
the last rules should be maxspeed up to 120 kmh maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() <= 120 { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 6 }
maxspeed higher then 120 kmh maxspeed=* & mkgmap:road-speed-class!=* & maxspeedkmh() > 120 { set mkgmap:road-speed-class = 7 }
mkgmap:road-speed-class isn't set anywhere in default style, except in current roadspeed include file. Condition mkgmap:road-speed-class!=* would be false, maybe you wanted to put mkgmap:road-speed-max there?.
i'm using the default rules in inc/roadspeed from the default style mkgmap:road-speed-max is IMHO not needed because '7' is the highest value, but i think your last rule ignores speed higher then 120 kmh maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() != * { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 } mkgmap:road-speed-max = 7 is only set if maxspeedkmh() isn't set, but maxspeedkmh() couldn't be empty if the maxpeed value is numeric, so there is no possibilty to set a mkgmap:road-speed-max = 7 for streets with maxspeed higher then 120 kmh maybe this rule works as you expected, but it is a catch all, i don't like them ;-) maxspeed=* & mkgmap:road-speed-max!=* & maxspeedkmh() = * { set mkgmap:road-speed='-0'; set mkgmap:road-speed-max = 7 }
Setting value for mkgmap:road-speed-class is what I want to avoid in my include. Setting mkgmap:road-speed-max=7 doesn't limit anything either, could be omitted. The reason for setting mkgmap:road-speed='-0' is to clear any existing value, but maybe this is superfluous.
I think setting mkgmap:road-speed-class is only needed for the highest value, higher then 120 kmh mkgmap:road-speed='-0' didn't distube me much, but IMHO it's superfluous Sorry, i can't describe it better, my english isn't good enough. Bernd -- amarok2 now playing: