[mkgmap-dev] access=no on a cycleway doesn't work?
From Felix Hartmann extremecarver at googlemail.com on Tue Nov 24 08:26:55 GMT 2009
Toby Speight wrote: > 0> In article <4B0AD385.8030305 at gmail.com>, > 0> Felix Hartmann <URL:mailto:extremecarver at googlemail.com> ("Felix") wrote: > > Felix> Toby Speight wrote: > >>> I've had a look at assigning access values and now have the following at >>> the head of my lines file: >>> >>> /-------- >>> | # Don't route over unsuitable roads >>> | smoothness=horrible | smoothness=very_horrible | smoothness=impassable >>> | { set motorcar=no; set hgv=no; set bicycle=no; } >>> | smoothness=very_bad >>> | { set motorcar=no; set hgv=no; } >>> | >>> | # Highway access rules >>> | highway=bridleway {add access = no; add bicycle = yes; add horse=yes; add foot = yes} >>> | highway=cycleway {add access = no; add bicycle = yes; add foot = yes} >>> | highway=footway {add access = no; add foot = yes} >>> | highway=motorway {add oneway = yes; add bicycle = no; add horse=no; add foot = no } >>> | highway=motorway_link {add bicycle = no; add horse=no; add foot = no } >>> | highway=path {add access = no; add bicycle = yes; add foot = yes} >>> | highway=track {add access = no; add bicycle = yes; add horse=yes; add foot = yes} >>> | highway=pedestrian & area!=yes {add access = no; add foot = yes} >>> | highway=steps {add access = no; add foot = yes} >>> | >>> | bicycle=dismount { set bicycle = 'yes'; set maxspeed = '5' } >>> | >>> | # General access rules >>> | access=* { add foot='${access}'; add horse='${access}'; add vehicle='${access}'; } >>> | vehicle=* { add bicycle='${vehicle}'; add motor_vehicle='${vehicle}'; } >>> | motor_vehicle=* { add motorcycle='${motor_vehicle}'; add motorcar='${motor_vehicle}'; >>> | add psv='${motor_vehicle}'; add hgv='${motor_vehicle}'; add goods='${motor_vehicle}'; >>> | add taxi='${motor_vehicle}'; } >>> \-------- >>> >>> Should this be added to the default style? >>> > > Felix> No IMHO it shouldn't. Why? Because unconditional rules will not > Felix> work as you expect! > Felix> > Felix> If one rule matches, all other unconditional are dropped for the > Felix> line. So forget about it - or make so many combinations that it > Felix> has to match. You will then however quickly arrive at over 1000 > Felix> rules, just for a few tags. > > I'm sorry - I don't understand what you mean by this. What do you mean > by "If one rule matches, all other unconditional are dropped for the > line"? Can you give an example of a situation where the rules don't > have the desired effect? Maybe there's something I can do to improve > them, or to improve mkgmap - or even to create a separate preprocessor, > if necessary. > If there is a footway with smoothness=very_bad Only one of the above rules will be enacted. If you want that both happens, you have to put a rule: smoothness=very_bad & highway=footway {add access = no; add foot = yes,......} As the first rule matches, no other unconditional rule will be enacted on a way/line. Only a condition [0x*...] rule will match again. Rules with more conditions prevail however over rules with fewer conditions. so smoothness=very_bad & highway=footway smoothness=very_bad highway=footway no matter in which order they are placed, the rule including both will be chosen > ________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091124/217d1c0a/attachment.html
- Previous message: [mkgmap-dev] access=no on a cycleway doesn't work?
- Next message: [mkgmap-dev] access=no on a cycleway doesn't work?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list