[PATCH] improve handling of access restrictions in osm routing

Hi, The attached patch improves the handling of access restriction tags so that you can now restrict on a vehicle class basis i.e. hgv=no Not all of the OSM tags are supported as the Garmin doesn't seem to recognise the existence of horses or motorcycles or taxis. This should apply to the current nod SVN trunk. The earlier patch to frig roundabouts is also to the same file but they should not conflict. Feedback, etc. Cheers, Mark

The attached patch improves the handling of access restriction tags so that you can now restrict on a vehicle class basis i.e. hgv=no
With a short glance at your patch I've seen that the keywords are contained in the sourcecode. Shouldn't it be in defined in the style file? As far as I can see, at the moment there is no possibility to define default restricitions for different tracktypes. I would propose further keywords in the lines file, e.g. highway=cycleway [0x0a road_class=0 road_speed=1 *access=bycycle,foot* resolution 21] or highway=cycleway[0x0a road_class=0 road_speed=1 *access_bycycle=yes access_foot=yes* resolution 21]

Hi Johann,
The attached patch improves the handling of access restriction tags so that you can now restrict on a vehicle class basis i.e. hgv=no
With a short glance at your patch I've seen that the keywords are contained in the sourcecode. Shouldn't it be in defined in the style file?
As far as I can see, at the moment there is no possibility to define default restricitions for different tracktypes. I would propose further keywords in the lines file, e.g.
highway=cycleway [0x0a road_class=0 road_speed=1 *access=bycycle,foot* resolution 21]
or
highway=cycleway[0x0a road_class=0 road_speed=1 *access_bycycle=yes access_foot=yes* resolution 21]
The most recent version of my code now pays attention to these OSM tags: access, bicycle, foot, hgv, motorcar, motorcycle, psv. Unfortunately, the Garmin codes don't appear to know about motorcycles (they lump motorcycles and cars together) or horses (or taxis, either). So if a way is tagged with one of those, i.e. hgv="no", the gps will know about it. If this is not adequate, we can look into adding extra information in the style file. Cheers, Mark

Sorry, I forgot to add the latest patch - it's attached.

With this patch applied to r878 I was still instructed to turn right at a no right turn restriction The relation editor in josm shows the following restriction no_right_turn type restriction from Fred Road (2 nodes) to Bloggs Road (12 nodes) via 123456789 (53.0000, -2.0000) I can see no error in this when compared to other turn restrictions except possibly that Fred Road is halfway along Bloggs Road and though there is obviously a node at this point Bloggs Road is not split at the node. Anyone care to comment as if this is the case then there are many restrictions added that are like that. Thanks Paul Mark Burton wrote:
Hi,
The attached patch improves the handling of access restriction tags so that you can now restrict on a vehicle class basis i.e. hgv=no
Not all of the OSM tags are supported as the Garmin doesn't seem to recognise the existence of horses or motorcycles or taxis.
This should apply to the current nod SVN trunk. The earlier patch to frig roundabouts is also to the same file but they should not conflict.
Feedback, etc.
Cheers,
Mark
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Feb 13, 2009, at 18:30, Paul wrote:
With this patch applied to r878 I was still instructed to turn right at a no right turn restriction
You shouldn't have expected anything different :) I don't think anybody has claimed support for turn restrictions in mkgmap. There's code in that should write restriction data, but at the moment neither the polish nor the osm data source make use of it. Cheers Robert

Hi Robert,
I don't think anybody has claimed support for turn restrictions in mkgmap. There's code in that should write restriction data, but at the moment neither the polish nor the osm data source make use of it.
OK, I am happy to look into supporting turn restrictions - briefly, what's involved? Cheers, Mark

On Feb 13, 2009, at 19:31, Mark Burton wrote:
I don't think anybody has claimed support for turn restrictions in mkgmap. There's code in that should write restriction data, but at the moment neither the polish nor the osm data source make use of it.
OK, I am happy to look into supporting turn restrictions - briefly, what's involved?
All you should have to do is create imgfmt.app.net.RouteRestriction- objects for each turn restriction, and add them to the via-node with RouteNode.addRestriction. However, the code is entirely untested, so there's probably some debugging left to do. Cheers Robert

Robert Vollmert wrote:
On Feb 13, 2009, at 18:30, Paul wrote:
With this patch applied to r878 I was still instructed to turn right at a no right turn restriction
You shouldn't have expected anything different :)
I don't think anybody has claimed support for turn restrictions in mkgmap. There's code in that should write restriction data, but at the moment neither the polish nor the osm data source make use of it.
Cheers Robert
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Oh......Ok. If asked I would have said that when using osm2mp then turn restrictions were implemented but obviously I would have been wrong :) Paul

All this time I've been reading access restriction and thinking turn restriction. It's Friday and I've been at work all week. At least that's my excuse ;) PAul

Paul escribió:
Robert Vollmert wrote:
On Feb 13, 2009, at 18:30, Paul wrote:
With this patch applied to r878 I was still instructed to turn right at a no right turn restriction
You shouldn't have expected anything different :)
I don't think anybody has claimed support for turn restrictions in mkgmap. There's code in that should write restriction data, but at the moment neither the polish nor the osm data source make use of it.
Cheers Robert
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Oh......Ok.
If asked I would have said that when using osm2mp then turn restrictions were implemented but obviously I would have been wrong :) AFAIK osm2mp does process turn restrictions. When you create a map with osm2mp you can see in the output: Loading relations... n multipolygons, n turn restrictions ... Writing restrictions... n written Cheers Carlos

On Feb 13, 2009, at 20:26, Carlos Dávila wrote:
AFAIK osm2mp does process turn restrictions. When you create a map with osm2mp you can see in the output: Loading relations... n multipolygons, n turn restrictions ... Writing restrictions... n written
Yes, but mkgmap is currently ignoring them. Cheers Robert
participants (5)
-
Carlos Dávila
-
Johann Gail
-
Mark Burton
-
Paul
-
Robert Vollmert