Access Tags - is mkgmap also evaluating values other than no (e.g. delivery, destination, forestry, agricultural, permissive...)

While writing action rules to try out the link pois to roads I just wondered whether mkgmap only looks at access/bicycle/motorcar.... =no or also other values like = delivery / destination / forestry / agricultural / private ? Also what happens if there is a road with access=no ; bicycle=permissive - is bicycle then set to yes? Am I correct in assuming that if access=no everything is first set to no, but later specific transport modes will in case be enabled if =yes (and if so which other tags) are present? I found this bit of code, which seems to indicate only =no is currently evaluated, correct? # new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list # new AccessMapping("bicycle", RoadNetwork.NO_BIKE), # new AccessMapping("foot", RoadNetwork.NO_FOOT), # new AccessMapping("hgv", RoadNetwork.NO_TRUCK), # new AccessMapping("motorcar", RoadNetwork.NO_CAR), # new AccessMapping("motorcycle", RoadNetwork.NO_CAR), # new AccessMapping("psv", RoadNetwork.NO_BUS), # new AccessMapping("taxi", RoadNetwork.NO_TAXI), # new AccessMapping("emergency", RoadNetwork.NO_EMERGENCY), # new AccessMapping("delivery", RoadNetwork.NO_DELIVERY), # new AccessMapping("goods", RoadNetwork.NO_DELIVERY),

Felix,
While writing action rules to try out the link pois to roads I just wondered whether mkgmap only looks at access/bicycle/motorcar.... =no or also other values like = delivery / destination / forestry / agricultural / private ?
It only looks at vehicle classes as in the list you show below.
Also what happens if there is a road with access=no ; bicycle=permissive - is bicycle then set to yes? Am I correct in assuming that if access=no everything is first set to no, but later specific transport modes will in case be enabled if =yes (and if so which other tags) are present?
Yes, that's how it works. Values of "yes", "designated" and "permissive" will enable access to the given vehicle type. So in your example above, it should work as you hope.
I found this bit of code, which seems to indicate only =no is currently evaluated, correct?
Not correct.
# new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list # new AccessMapping("bicycle", RoadNetwork.NO_BIKE), # new AccessMapping("foot", RoadNetwork.NO_FOOT), # new AccessMapping("hgv", RoadNetwork.NO_TRUCK), # new AccessMapping("motorcar", RoadNetwork.NO_CAR), # new AccessMapping("motorcycle", RoadNetwork.NO_CAR), # new AccessMapping("psv", RoadNetwork.NO_BUS), # new AccessMapping("taxi", RoadNetwork.NO_TAXI), # new AccessMapping("emergency", RoadNetwork.NO_EMERGENCY), # new AccessMapping("delivery", RoadNetwork.NO_DELIVERY), # new AccessMapping("goods", RoadNetwork.NO_DELIVERY),
This is just setting up the relationship between the OSM name and the garmin data structure bit for the various vehicle types recognised. Cheers, Mark

Mark Burton wrote:
Felix,
While writing action rules to try out the link pois to roads I just wondered whether mkgmap only looks at access/bicycle/motorcar.... =no or also other values like = delivery / destination / forestry / agricultural / private ?
It only looks at vehicle classes as in the list you show below.
Also what happens if there is a road with access=no ; bicycle=permissive - is bicycle then set to yes? Am I correct in assuming that if access=no everything is first set to no, but later specific transport modes will in case be enabled if =yes (and if so which other tags) are present?
Yes, that's how it works. Values of "yes", "designated" and "permissive" will enable access to the given vehicle type. So in your example above, it should work as you hope.
I found this bit of code, which seems to indicate only =no is currently evaluated, correct?
Not correct.
O.k. so where do I find the other values? Actually can I delete some access mapping lines if I don't want them - this would be easier than working with action rules. So if I crunch the below list down to # new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list # new AccessMapping("bicycle", RoadNetwork.NO_BIKE), # new AccessMapping("foot", RoadNetwork.NO_FOOT), Do I then achieve my goal of not needing to give action rules like motorcar!=yes | motorcycle!=yes {set access=yes; set motorcar=yes; set motorcycle=yes; set ...} Or will this break mkgmap?
# new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list # new AccessMapping("bicycle", RoadNetwork.NO_BIKE), # new AccessMapping("foot", RoadNetwork.NO_FOOT), # new AccessMapping("hgv", RoadNetwork.NO_TRUCK), # new AccessMapping("motorcar", RoadNetwork.NO_CAR), # new AccessMapping("motorcycle", RoadNetwork.NO_CAR), # new AccessMapping("psv", RoadNetwork.NO_BUS), # new AccessMapping("taxi", RoadNetwork.NO_TAXI), # new AccessMapping("emergency", RoadNetwork.NO_EMERGENCY), # new AccessMapping("delivery", RoadNetwork.NO_DELIVERY), # new AccessMapping("goods", RoadNetwork.NO_DELIVERY),
This is just setting up the relationship between the OSM name and the garmin data structure bit for the various vehicle types recognised.
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Felix,
O.k. so where do I find the other values?
What other values?
Actually can I delete some access mapping lines if I don't want them - this would be easier than working with action rules.
So if I crunch the below list down to
# new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list # new AccessMapping("bicycle", RoadNetwork.NO_BIKE), # new AccessMapping("foot", RoadNetwork.NO_FOOT),
Do I then achieve my goal of not needing to give action rules like motorcar!=yes | motorcycle!=yes {set access=yes; set motorcar=yes; set motorcycle=yes; set ...} Or will this break mkgmap?
Sorry, I'm being thick - I don't understand what you want to achieve - please describe the desired result in (English!) words. Cheers, Mark

Mark Burton wrote:
Felix,
O.k. so where do I find the other values?
Well, if you said not only =no has an effect, what happens to access=destination or access=private - AFAIK Garmin only accepts yes or no, so which of the values (permissive, private, delivery...) is taken for "no". Or put differently, which value other than "no" will block the road for a given mode of transport?
What other values?
Actually can I delete some access mapping lines if I don't want them - this would be easier than working with action rules.
So if I crunch the below list down to
# new AccessMapping("access", RoadNetwork.NO_MAX), // must be first in list # new AccessMapping("bicycle", RoadNetwork.NO_BIKE), # new AccessMapping("foot", RoadNetwork.NO_FOOT),
Do I then achieve my goal of not needing to give action rules like motorcar!=yes | motorcycle!=yes {set access=yes; set motorcar=yes; set motorcycle=yes; set ...} Or will this break mkgmap?
Sorry, I'm being thick - I don't understand what you want to achieve - please describe the desired result in (English!) words.
I want that mkgmap takes no action in case of motorcar=no, or motorcycle=no, and only set restrictions if: access=no/private & ( bicycle!=* foot!=*) --- / bicycle=no/private --- / foot=no/private (In order to use motorcar/motorcycle setting in GPS for bicycling/walking because the respective profiles in the GPS are useless for bicycle/foot autorouting. - Therefore I need mkgmap to drop any restrictions that only apply to motor vehicles)
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Felix, Thanks for spelling it out to me.
O.k. so where do I find the other values?
Well, if you said not only =no has an effect, what happens to access=destination or access=private - AFAIK Garmin only accepts yes or no, so which of the values (permissive, private, delivery...) is taken for "no". Or put differently, which value other than "no" will block the road for a given mode of transport?
At this time, "no" and "private" are considered the same.
I want that mkgmap takes no action in case of motorcar=no, or motorcycle=no, and only set restrictions if: access=no/private & ( bicycle!=* foot!=*) --- / bicycle=no/private --- / foot=no/private (In order to use motorcar/motorcycle setting in GPS for bicycling/walking because the respective profiles in the GPS are useless for bicycle/foot autorouting. - Therefore I need mkgmap to drop any restrictions that only apply to motor vehicles)
How about an option along the lines of --delete-tags="motorcar,motorcycle" that deletes the tags with the specified names? This would happen before the style rules are processed? That would be trivial to implement. Cheers, Mark

Mark Burton wrote:
Felix,
Thanks for spelling it out to me.
O.k. so where do I find the other values?
Well, if you said not only =no has an effect, what happens to access=destination or access=private - AFAIK Garmin only accepts yes or no, so which of the values (permissive, private, delivery...) is taken for "no". Or put differently, which value other than "no" will block the road for a given mode of transport?
At this time, "no" and "private" are considered the same.
I want that mkgmap takes no action in case of motorcar=no, or motorcycle=no, and only set restrictions if: access=no/private & ( bicycle!=* foot!=*) --- / bicycle=no/private --- / foot=no/private (In order to use motorcar/motorcycle setting in GPS for bicycling/walking because the respective profiles in the GPS are useless for bicycle/foot autorouting. - Therefore I need mkgmap to drop any restrictions that only apply to motor vehicles)
How about an option along the lines of
--delete-tags="motorcar,motorcycle"
that deletes the tags with the specified names?
This would happen before the style rules are processed?
That would be trivial to implement.
Cheers,
Mark
It would be great to have --delete-tags="motorcar,motorcycle (private/no)" Actually I'm a bit afraid of people putting access=no motorcar=forestry but forgetting bicycle=yes or foot=yes. What would best be --delete-tags"/resources/deletetags" and put all tags with values into that file as a list like motorcar=no motorcar=private motorcycle=no motorcycle=private emergency=no ...... and that list deletes all those tags before processing the style-rules.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

It would be great to have --delete-tags="motorcar,motorcycle (private/no)" Actually I'm a bit afraid of people putting access=no motorcar=forestry but forgetting bicycle=yes or foot=yes.
What would best be --delete-tags"/resources/deletetags" and put all tags with values into that file as a list like motorcar=no motorcar=private motorcycle=no motorcycle=private emergency=no ...... and that list deletes all those tags before processing the style-rules.
OK, I'll work on that this evening. Mark

Felix Hartmann schrieb:
Well, if you said not only =no has an effect, what happens to access=destination or access=private - AFAIK Garmin only accepts yes or no, so which of the values (permissive, private, delivery...) is taken for "no". Or put differently, which value other than "no" will block the road for a given mode of transport?
Hi Felix, I think you have to do it in the style file. In my style there is one single line for this : # Access highway=* & (access=private | access=destination | motorcar=destination | motor_vehicle=destination | access=agricultural) {add motorcar = no} and this works well for me. As you see I block only cars, but that's what I want. ;-) Chris

Chris-Hein Lunkhusen wrote:
Felix Hartmann schrieb:
Well, if you said not only =no has an effect, what happens to access=destination or access=private - AFAIK Garmin only accepts yes or no, so which of the values (permissive, private, delivery...) is taken for "no". Or put differently, which value other than "no" will block the road for a given mode of transport?
Hi Felix,
I think you have to do it in the style file.
In my style there is one single line for this :
# Access
highway=* & (access=private | access=destination | motorcar=destination | motor_vehicle=destination | access=agricultural) {add motorcar = no}
and this works well for me. As you see I block only cars, but that's what I want. ;-)
Of course I know that I have to do the "quoted" in my style-file. But to do exactly this it would be good to have some tags deleted beforehand / ignore list where I can list all tags I want to be ignored (like motorcar=no; motorcycle=no; psv=no;...) The problem as we know is that action rules are only matched on one way, so putting the "Access" rules as action rules might not work if there are other rules enacted on the same way! My action rules are already 3000 lines long to catch as many possibilities as possible. Adding access into this means 3000³ lines only for action rules in the lines file and would crazily slowing down mkgmap.
Chris
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (3)
-
Chris-Hein Lunkhusen
-
Felix Hartmann
-
Mark Burton