
Hi, we had here already some posts about Garmin Maps and routing for bicycles. I did quite some tests in the last time. At first, the good news is, that with the 3.50 firmware for the 62s, routing for bikes works again really good. Looks like with 3.40 something was broken there. But I saw still some cycleways, where the Garmin refuses to route me about. After looking at the OSM data, I found the following difference: - working: highway=path bicycle=designated foot=designated - not working: highway=path bicycle=official foot=offcial The rules in my style are the same as of the default style, and from that, there shouldn't be a difference. Both ways should be changed to highway=cycleway, and if I look at the map, this is working fine. The map draws a cycleway and not a path. So my question is, how does mkgmap sets the flag if a bike is allowed or not? Could it be that mkgmap does not handle bicycle=official as bicycle=yes? If somebody wants to test it: Create a long way with the working tags, escept a short distance in the middle. For this short distance, create a very, very long alternate route. The 62s will always use the alternate route, never the short one. Thanks, Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Sat, Nov 05, Thorsten Kukuk wrote:
Hi,
we had here already some posts about Garmin Maps and routing for bicycles.
I did quite some tests in the last time. At first, the good news is, that with the 3.50 firmware for the 62s, routing for bikes works again really good. Looks like with 3.40 something was broken there. But I saw still some cycleways, where the Garmin refuses to route me about.
After looking at the OSM data, I found the following difference: - working: highway=path bicycle=designated foot=designated
- not working: highway=path bicycle=official foot=offcial
The rules in my style are the same as of the default style, and from that, there shouldn't be a difference. Both ways should be changed to highway=cycleway, and if I look at the map, this is working fine. The map draws a cycleway and not a path.
So my question is, how does mkgmap sets the flag if a bike is allowed or not? Could it be that mkgmap does not handle bicycle=official as bicycle=yes?
If somebody wants to test it: Create a long way with the working tags, escept a short distance in the middle. For this short distance, create a very, very long alternate route. The 62s will always use the alternate route, never the short one.
Here is one real life example: http://www.openstreetmap.org/browse/way/26557366 Indeependent of from which side I'm coming, the 62s refuses to route me over this part (requests a U-turn) of the way and proposes a 2km alternate way. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Thorsten, Can you test your routing with my openfietsmap Germany? I understand I use different styles but bicycle official and path are also set to highway=cycleway. I dont see any routing errors here in Mapsource, Basecamp or GPS (Dakota). So the error could be in your styles or in the GPS firmware and not in mkgmap.

On Sat, Nov 05, Minko wrote:
Thorsten, Can you test your routing with my openfietsmap Germany?
I'm currently downloading it.
I understand I use different styles but bicycle official and path are also set to highway=cycleway. I dont see any routing errors here in Mapsource, Basecamp or GPS (Dakota). So the error could be in your styles or in the GPS firmware and not in mkgmap.
It cannot be the GPS firmware, but I think it is a mkgmap bug:
From ./src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java: protected boolean accessExplicitlyAllowed(String val) { if (val == null) return false;
return (val.equalsIgnoreCase("yes") || val.equalsIgnoreCase("designated") || val.equalsIgnoreCase("permissive")); } mkgmap does not know about "official", but as far as I understand http://wiki.openstreetmap.org/wiki/Tag:access%3Dofficial we should handle it in the same way as "yes". I will try now a patched mkgmap. But as workaround setting bicycle=official to bicycle=yes in the style file should fix the routing problems, too. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Sun, Nov 06, Chris66 wrote:
Am 06.11.2011 11:52, schrieb Thorsten Kukuk:
mkgmap does not know about "official"
No, but the default style does....
Where? The default style file only has: highway=footway & snowplowing!=no & (bicycle=yes|bicycle=designated|bicycle=permissive|bicycle=official) {set highway=cycleway} highway=path & snowplowing!=no & (bicycle=designated|bicycle=permissive|bicycle=official) {set highway=cycleway} highway=path & (horse=designated|horse=official) {set highway=bridleway} This will not solve the problem, since bicycle=official will still not match the boolean expression in mkgmap itself. You would need "{set highway=cycleway; set bicycle=yes}" in the style file. The default style file besides shows the same routing issues on a 62s. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Thorsten wrote
You would need "{set highway=cycleway; set bicycle=yes}" in the style file. The default style file besides shows the same routing issues on a 62s.
Some cycleways that are temporarily out of order can have a tag access=no or bicycle=no. set bicycle=yes would clear this tag so better make it highway=cycleway & access!=no & bicycle!=no {set bicycle=yes}

On Sun, Nov 06, 2011 at 11:52:47AM +0100, Thorsten Kukuk wrote:
It cannot be the GPS firmware, but I think it is a mkgmap bug:
From ./src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java: protected boolean accessExplicitlyAllowed(String val) { if (val == null) return false;
return (val.equalsIgnoreCase("yes") || val.equalsIgnoreCase("designated") || val.equalsIgnoreCase("permissive")); }
mkgmap does not know about "official", but as far as I understand http://wiki.openstreetmap.org/wiki/Tag:access%3Dofficial we should handle it in the same way as "yes".
Thank you for the analysis!
I will try now a patched mkgmap. But as workaround setting bicycle=official to bicycle=yes in the style file should fix the routing problems, too.
I can commit the fix (adding "official" to the above tags), once you have verified it. Marko

Am Sonntag 06 November 2011, 20:26:56 schrieb Marko Mäkelä:
On Sun, Nov 06, 2011 at 11:52:47AM +0100, Thorsten Kukuk wrote:
It cannot be the GPS firmware, but I think it is a mkgmap bug:
From ./src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java: protected boolean accessExplicitlyAllowed(String val) {
if (val == null)
return false;
return (val.equalsIgnoreCase("yes") ||
val.equalsIgnoreCase("designated") || val.equalsIgnoreCase("permissive"));
}
mkgmap does not know about "official", but as far as I understand http://wiki.openstreetmap.org/wiki/Tag:access%3Dofficial we should handle it in the same way as "yes".
Thank you for the analysis!
I will try now a patched mkgmap. But as workaround setting bicycle=official to bicycle=yes in the style file should fix the routing problems, too.
I can commit the fix (adding "official" to the above tags), once you have verified it.
Marko
Sorry, but i oppose commiting this 'fix' which IMO is a bug. Do not add more semantic intepretation to the hardcoded part of mkmap. Instead write a stylefile rule that reflects to only one value in the code above. This is not a workaround, this is the better and cleaner way. Best regards Hasemann

On Mon, Nov 07, 2011 at 12:52:17AM +0100, Olaf Hasemann wrote:
Sorry, but i oppose commiting this 'fix' which IMO is a bug. Do not add more semantic intepretation to the hardcoded part of mkmap. Instead write a stylefile rule that reflects to only one value in the code above. This is not a workaround, this is the better and cleaner way.
You are right. I will do that then. Marko

On Mon, Nov 07, Olaf Hasemann wrote:
Sorry, but i oppose commiting this 'fix' which IMO is a bug. Do not add more semantic intepretation to the hardcoded part of mkmap. Instead write a stylefile rule that reflects to only one value in the code above. This is not a workaround, this is the better and cleaner way.
I disagree for several reasons: - the code handles already 3 out of four values and not one as you claim - You have to duplicate and sync the lines for every file, which is known to be error prone, makes the style file unreadable and more complex than necessary. - It's next to impossible to write style file rules for all cases, since you need to list all cases. We don't have the problem only with bicycle, but with all other access keys, too. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Sun, Nov 06, Marko Mäkelä wrote:
I can commit the fix (adding "official" to the above tags), once you have verified it.
Here is the one liner which fixes all of my routing problems I was aware of. I still think we should apply it, since we check already for 3 out of 4 cases and handling this in the style file for all cases is pretty complex if next to impossible. --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java +++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java 2011/11/06 10:50:45 @@ -1806,7 +1806,8 @@ return (val.equalsIgnoreCase("yes") || val.equalsIgnoreCase("designated") || - val.equalsIgnoreCase("permissive")); + val.equalsIgnoreCase("permissive") || + val.equalsIgnoreCase("official")); } protected boolean accessExplicitlyDenied(String val) { -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Mon, Nov 07, 2011 at 09:50:13AM +0100, Thorsten Kukuk wrote:
Here is the one liner which fixes all of my routing problems I was aware of. I still think we should apply it, since we check already for 3 out of 4 cases and handling this in the style file for all cases is pretty complex if next to impossible.
I agree that it makes sense to extend the check inside the code. Olaf Hasemann has a point that processing should move to the style rules to the extent possible. One thing that we could do is add an indirection to the mkgmap:* name space, e.g., mkgmap:access:V=yes/no/destination for V={foot,bicycle,car,taxi,emergency}. But, I am not sure if it is worth the effort here. Maybe it would be for those map builders who repurpose some of the Garmin access bits for something else. Let us wait a couple of days for the dispute to settle. For now, r2067 tries to address this in the default style. Best regards, Marko

On Mon, Nov 07, Marko Mäkelä wrote:
Let us wait a couple of days for the dispute to settle. For now, r2067 tries to address this in the default style.
Sorry, but r2067 only workarounds this if you have highway=footway & bicycle=official and highway=path & bicycle=official It does not fix the most common usage I run into: highway=cycleway & bicycle=official And what is with all the other access tags like motorcar/motorcyle/...? This only shows once more that it is pretty difficult next to impossible to handle this in a style file correct. With mkgmap r2067 you have still big routing problems. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Wed, Nov 09, 2011 at 09:46:44AM +0100, Thorsten Kukuk wrote:
Sorry, but r2067 only workarounds this if you have highway=footway & bicycle=official and highway=path & bicycle=official
It does not fix the most common usage I run into: highway=cycleway & bicycle=official
And what is with all the other access tags like motorcar/motorcyle/...?
OK, you convinced me to commit your fix to the mkgmap core, in r2068. Marko

On Sat, Nov 05, Minko wrote:
Thorsten, Can you test your routing with my openfietsmap Germany?
Your maps does not have this problem for bicycles because of: "bicycle=permissive | bicycle=official { set bicycle=yes }" in your style file. That's a valid workaround, but does not solve the problem for bicycles, not for others. So I really think we should fix mkgmap to handle "official" itself. Else all style files, including the default mkgmap style, needs this line. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On 06.11.2011 11:58, Thorsten Kukuk wrote:
On Sat, Nov 05, Minko wrote:
Thorsten, Can you test your routing with my openfietsmap Germany? Your maps does not have this problem for bicycles because of: "bicycle=permissive | bicycle=official { set bicycle=yes }"
in your style file. That's a valid workaround, but does not solve the problem for bicycles, not for others.
So I really think we should fix mkgmap to handle "official" itself. Else all style files, including the default mkgmap style, needs this line.
I think bicycle=official and other official tags should not be handled in the backend. This is a crazy idea for cycling. When cycling I actually want to avoid any bicycle=official cause I don't like to be forced to use a certain way, but decide if I ride on cycleway or on the street myself. Handling bicycle=official via style-file, I can much better filter the priority of roads myself. IMHO only yes, no and destination (destination means no, cause no through traffic allowed, and Garmin considers no like destination in routing) should be hardcoded. All other values like permissive, official, and designated should not be handled by the backend.
participants (6)
-
Chris66
-
Felix Hartmann
-
Marko Mäkelä
-
Minko
-
Olaf Hasemann
-
Thorsten Kukuk