On 09.05.2010 23:51, Felix Hartmann wrote:
I am coming to a point when maintaining my lines file, that adding a
single key on top, means 200-300 lines more. This is becoming
unmaintainable. It would be great to have the option to have rules
just like the ones we have for POI that one can run on certain keys.
e.g.
lanes=2 & oneway=yes { add mkgmap:road-speed = '-1'; add
mkgmap:road-class = '-1'; }
This should then be matched to all lines that are generated after this
command. As this is already possible for POI, I hope someone could
without much effort implement this for rules based on tags too. This
would be very useful as it saves many many lines of code. Currently if
you would like to do something like this, it means that you have to
add the rule to every line (with autorouting) in your lines file. This
is okay for one or to tags (like some people do for maxspeed), but it
becomes impossible to keep track once you have 10 tags you like to be
enacted.
If there are several rules matching, they should simply add up. (or
equalise themselves if +1 meets -1...)
It would be really great if someone could implement this feature. As
it exists already for POI when using link-pois-to-ways I have the
great hope that it is easy to implement and program and someone finds
some spare time to do it. This could really help to avoid creating a
ton of rules and open up many new possibilities to much better
finetune road_class and road_speed.
It would be a plus, if one could only "apply" this rule until a stop
rule is given. Quick example
lanes=2 & oneway=yes { add mkgmap:road-speed = '+1'; add
mkgmap:road-class = '+1'; set rule=1 }
highway=primary & maxspeed=100 {road_class=3 road_speed=4 0x02]
highway=primary ....
highway=secondary...
....
rule=1 {stop execution}
Just to give some really useful example why we need this....
/
incline>20 | incline<-20 { add mkgmap:road-speed = '+1'; add
mkgmap:road-class = '+1'; set rule=1 }/
could be used to give much more realistic time estimates and prefer
streets through the valley instead of driving "over the mountain".
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev