
Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike

Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

----- Oorspronkelijk bericht -----
Van: "Gerd Petermann" <gpetermann_muenchen@hotmail.com> Aan: mkgmap-dev@lists.mkgmap.org.uk Verzonden: Dinsdag 3 maart 2015 09:26:00 Onderwerp: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike,
I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out.
If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases?
Is anybody able to change the default style so that it produces the same result ?
Gerd
Yes, we have discussed this before, I tried to add it in the styles for the OSM generic maps, but this resulted in wrong navigation for cars. The name "cycleway" in the synthetic part you can delete by this rule in your line style: mkgmap:synthesised=yes & bicycle=yes { set mkgmap:highest-resolution-only = true; delete name } http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2014q2/020939.html

Hi Minko, reg. broken car routing: if I got it right, there is no way to avoid this problem completely when adding multiple routable ways for a single OSM way. You either have broken car routing or broken bicycle routing, depending on the order in which the ways are added to the net. Is this still correct or did you find a way to work around that problem? Gerd ligfietser wrote
----- Oorspronkelijk bericht -----
Van: "Gerd Petermann" <
gpetermann_muenchen@
>
Aan:
mkgmap-dev@.org
Verzonden: Dinsdag 3 maart 2015 09:26:00 Onderwerp: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike,
I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out.
If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases?
Is anybody able to change the default style so that it produces the same result ?
Gerd
Yes, we have discussed this before, I tried to add it in the styles for the OSM generic maps, but this resulted in wrong navigation for cars. The name "cycleway" in the synthetic part you can delete by this rule in your line style:
mkgmap:synthesised=yes & bicycle=yes { set mkgmap:highest-resolution-only = true; delete name }
http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2014q2/020939.html _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/make-opposite-cycleways-option-tp5835586p5835... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Yes Gerd, you are right. I didnt find any workaround to solve this. But at least there is a workaround to delete those artificial "cycleway" names, should be set in the default style rules too imho (if anyone likes to see those names, just put a # before that line).

Hi Minko,
Yes Gerd, you are right. I didnt find any workaround to solve this.
Okay. I wish you did.
But at least there is a workaround to delete those artificial "cycleway" names, should be set in the default style rules too imho (if anyone likes to see those names, just put a # before that line). I agree. They are probably only useful when debugging.
Gerd

HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? Gerd From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways optionDear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? Gerd From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can’t see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways optionDear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 16:22 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? Gerd From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn’t seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can’t see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? I think that is the problem I was discussing with Minko. The order in which routable ways are added by the style matters, although we don't know exactly why. With the --make-opposite-cycleways the cycle way is added after the "normal" way, with your change below it is added before. Garmin algos seem to use only one way in some cases, esp. at the beginning of a route. Further thoughts: 1) Your new patch also removes the special handling for mkgmap:synthesised in inc/access -#limit artificial cycleways to to resolution 24 -mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true } This is okay for your case, but I should mention that the tag mkgmap:synthesised is also evaluated within mkgmap to avoid some meaningless warnings in e.g. the roundabout checks. In other words: A style that adds multiple routable ways for one OSM way should try to setmkgmap:synthesised=true when options like --check-roundabouts or --check-roundabout-flares are used. I think we might as well set that a corresponding flag in mkgmap when it detects that more than one routable way was added (with res 24) for one OSM way. 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? Gerd

Hi Gerd, It is possible that the order might have some significance. However, in my own style file I also add the cycleway first and it works fine, providing I do not attempt to start, finish or add a via point to the road. Attempting to start, finish or add a point I can understand might be problematic as the software would not know whether to put the point on the road or the cycleway and may well use the order in which the lines were added. I removed the mkgmap:synthesized line as according to the style manual the value is yes if the way was added by the make-oppositecycleways option, and a check of the code showed that it was the only place it was set. If the updated style file is to replace the make-oppositecycleways option, then this line is no longer required, as it is specific to the cycleway. To retain the functionality, I guess that the additional line should be highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway; set mkgmap:synthesised=true} [0x10 road_class=0 road_speed=1 resolution 24 continue] Perhaps the documentation could be enhanced to mention setting mkgmap:synthesised in a style. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 06 March 2015 06:40 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, _____ Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? I think that is the problem I was discussing with Minko. The order in which routable ways are added by the style matters, although we don't know exactly why. With the --make-opposite-cycleways the cycle way is added after the "normal" way, with your change below it is added before. Garmin algos seem to use only one way in some cases, esp. at the beginning of a route. Further thoughts: 1) Your new patch also removes the special handling for mkgmap:synthesised in inc/access -#limit artificial cycleways to to resolution 24 -mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true } This is okay for your case, but I should mention that the tag mkgmap:synthesised is also evaluated within mkgmap to avoid some meaningless warnings in e.g. the roundabout checks. In other words: A style that adds multiple routable ways for one OSM way should try to setmkgmap:synthesised=true when options like --check-roundabouts or --check-roundabout-flares are used. I think we might as well set that a corresponding flag in mkgmap when it detects that more than one routable way was added (with res 24) for one OSM way. 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? Gerd

Hi Mike, reg. wrong car routing in oneways: I'll check that, I see no reason now. Sounds like "continue" is handled like "continue with actions" in this case? reg. docu for mkgmap:synthesised: yes, please post a patch for that Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 6 Mar 2015 09:56:28 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, It is possible that the order might have some significance. However, in my own style file I also add the cycleway first and it works fine, providing I do not attempt to start, finish or add a via point to the road. Attempting to start, finish or add a point I can understand might be problematic as the software would not know whether to put the point on the road or the cycleway and may well use the order in which the lines were added. I removed the mkgmap:synthesized line as according to the style manual the value is yes if the way was added by the make-oppositecycleways option, and a check of the code showed that it was the only place it was set. If the updated style file is to replace the make-oppositecycleways option, then this line is no longer required, as it is specific to the cycleway. To retain the functionality, I guess that the additional line should behighway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway; set mkgmap:synthesised=true} [0x10 road_class=0 road_speed=1 resolution 24 continue]Perhaps the documentation could be enhanced to mention setting mkgmap:synthesised in a style. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 06 March 2015 06:40 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike,Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn’t seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can’t see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? I think that is the problem I was discussing with Minko. The order in which routable ways are added by the style matters, although we don't know exactly why. With the --make-opposite-cycleways the cycle way is added after the "normal" way, with your change below it is added before. Garmin algos seem to use only one way in some cases, esp. at the beginning of a route. Further thoughts: 1) Your new patch also removes the special handling for mkgmap:synthesised in inc/access -#limit artificial cycleways to to resolution 24 -mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true } This is okay for your case, but I should mention that the tag mkgmap:synthesised is also evaluated within mkgmap to avoid some meaningless warnings in e.g. the roundabout checks. In other words: A style that adds multiple routable ways for one OSM way should try to setmkgmap:synthesised=true when options like --check-roundabouts or --check-roundabout-flares are used. I think we might as well set that a corresponding flag in mkgmap when it detects that more than one routable way was added (with res 24) for one OSM way. 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, happy to update the documentation, but where do I find its source? I only have a PDF of the style manual. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 06 March 2015 10:05 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, reg. wrong car routing in oneways: I'll check that, I see no reason now. Sounds like "continue" is handled like "continue with actions" in this case? reg. docu for mkgmap:synthesised: yes, please post a patch for that Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Fri, 6 Mar 2015 09:56:28 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, It is possible that the order might have some significance. However, in my own style file I also add the cycleway first and it works fine, providing I do not attempt to start, finish or add a via point to the road. Attempting to start, finish or add a point I can understand might be problematic as the software would not know whether to put the point on the road or the cycleway and may well use the order in which the lines were added. I removed the mkgmap:synthesized line as according to the style manual the value is yes if the way was added by the make-oppositecycleways option, and a check of the code showed that it was the only place it was set. If the updated style file is to replace the make-oppositecycleways option, then this line is no longer required, as it is specific to the cycleway. To retain the functionality, I guess that the additional line should be highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway; set mkgmap:synthesised=true} [0x10 road_class=0 road_speed=1 resolution 24 continue] Perhaps the documentation could be enhanced to mention setting mkgmap:synthesised in a style. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 06 March 2015 06:40 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, _____ Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? I think that is the problem I was discussing with Minko. The order in which routable ways are added by the style matters, although we don't know exactly why. With the --make-opposite-cycleways the cycle way is added after the "normal" way, with your change below it is added before. Garmin algos seem to use only one way in some cases, esp. at the beginning of a route. Further thoughts: 1) Your new patch also removes the special handling for mkgmap:synthesised in inc/access -#limit artificial cycleways to to resolution 24 -mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true } This is okay for your case, but I should mention that the tag mkgmap:synthesised is also evaluated within mkgmap to avoid some meaningless warnings in e.g. the roundabout checks. In other words: A style that adds multiple routable ways for one OSM way should try to setmkgmap:synthesised=true when options like --check-roundabouts or --check-roundabout-flares are used. I think we might as well set that a corresponding flag in mkgmap when it detects that more than one routable way was added (with res 24) for one OSM way. 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, the sources are in the doc directory. Gerd Mike Baggaley wrote
Hi Gerd, happy to update the documentation, but where do I find its source? I only have a PDF of the style manual.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 06 March 2015 10:05 To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
reg. wrong car routing in oneways: I'll check that, I see no reason now. Sounds like "continue" is handled like "continue with actions" in this case?
reg. docu for mkgmap:synthesised: yes, please post a patch for that
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Fri, 6 Mar 2015 09:56:28 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd,
It is possible that the order might have some significance. However, in my own style file I also add the cycleway first and it works fine, providing I do not attempt to start, finish or add a via point to the road. Attempting to start, finish or add a point I can understand might be problematic as the software would not know whether to put the point on the road or the cycleway and may well use the order in which the lines were added.
I removed the mkgmap:synthesized line as according to the style manual the value is yes if the way was added by the make-oppositecycleways option, and a check of the code showed that it was the only place it was set. If the updated style file is to replace the make-oppositecycleways option, then this line is no longer required, as it is specific to the cycleway. To retain the functionality, I guess that the additional line should be highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway; set mkgmap:synthesised=true} [0x10 road_class=0 road_speed=1 resolution 24 continue] Perhaps the documentation could be enhanced to mention setting mkgmap:synthesised in a style.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 06 March 2015 06:40 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike, _____
Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street).
highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue]
I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)?
I think that is the problem I was discussing with Minko. The order in which routable ways are added by the style matters, although we don't know exactly why. With the --make-opposite-cycleways the cycle way is added after the "normal" way, with your change below it is added before. Garmin algos seem to use only one way in some cases, esp. at the beginning of a route.
Further thoughts: 1) Your new patch also removes the special handling for mkgmap:synthesised in inc/access -#limit artificial cycleways to to resolution 24 -mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true } This is okay for your case, but I should mention that the tag mkgmap:synthesised is also evaluated within mkgmap to avoid some meaningless warnings in e.g. the roundabout checks. In other words: A style that adds multiple routable ways for one OSM way should try to setmkgmap:synthesised=true when options like --check-roundabouts or --check-roundabout-flares are used.
I think we might as well set that a corresponding flag in mkgmap when it detects that more than one routable way was added (with res 24) for one OSM way.
2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ?
Gerd
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/make-opposite-cycleways-option-tp5835586p5836... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Gerd, I think the attached small update should be OK - I have also tweaked a couple of other bits. I can't seem to compile it into a document as I get a syntax error in ../resources/make.param (using Microsoft NMAKE). I haven't used this style of document creation for over 20 years :) Mike
Hi Mike,
the sources are in the doc directory.
Gerd

Hi Mike, thanks, I've committed it with one small change: removed a duplicate "it" I also never was able to compile the pdf on Windows. I've installed a Ubuntu system in a VirtualBox to be able to test with OpenJDK, but I did not use it for a long time now. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Sat, 7 Mar 2015 00:39:27 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I think the attached small update should be OK – I have also tweaked a couple of other bits. I can’t seem to compile it into a document as I get a syntax error in ../resources/make.param (using Microsoft NMAKE). I haven’t used this style of document creation for over 20 years J Mike >Hi Mike,> >the sources are in the doc directory.> >Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, I was not able to reproduce a problem with car routing in oneways using your patch. I see that routes are different when I reverse them in MapSource. Please double check and post test data if you still see the problem. Gerd From: gpetermann_muenchen@hotmail.com To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 6 Mar 2015 11:05:27 +0100 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, reg. wrong car routing in oneways: I'll check that, I see no reason now. Sounds like "continue" is handled like "continue with actions" in this case? reg. docu for mkgmap:synthesised: yes, please post a patch for that Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 6 Mar 2015 09:56:28 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, It is possible that the order might have some significance. However, in my own style file I also add the cycleway first and it works fine, providing I do not attempt to start, finish or add a via point to the road. Attempting to start, finish or add a point I can understand might be problematic as the software would not know whether to put the point on the road or the cycleway and may well use the order in which the lines were added. I removed the mkgmap:synthesized line as according to the style manual the value is yes if the way was added by the make-oppositecycleways option, and a check of the code showed that it was the only place it was set. If the updated style file is to replace the make-oppositecycleways option, then this line is no longer required, as it is specific to the cycleway. To retain the functionality, I guess that the additional line should behighway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway; set mkgmap:synthesised=true} [0x10 road_class=0 road_speed=1 resolution 24 continue]Perhaps the documentation could be enhanced to mention setting mkgmap:synthesised in a style. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 06 March 2015 06:40 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike,Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn’t seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can’t see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? I think that is the problem I was discussing with Minko. The order in which routable ways are added by the style matters, although we don't know exactly why. With the --make-opposite-cycleways the cycle way is added after the "normal" way, with your change below it is added before. Garmin algos seem to use only one way in some cases, esp. at the beginning of a route. Further thoughts: 1) Your new patch also removes the special handling for mkgmap:synthesised in inc/access -#limit artificial cycleways to to resolution 24 -mkgmap:synthesised=yes & mkgmap:bicycle=yes { set mkgmap:highest-resolution-only = true } This is okay for your case, but I should mention that the tag mkgmap:synthesised is also evaluated within mkgmap to avoid some meaningless warnings in e.g. the roundabout checks. In other words: A style that adds multiple routable ways for one OSM way should try to setmkgmap:synthesised=true when options like --check-roundabouts or --check-roundabout-flares are used. I think we might as well set that a corresponding flag in mkgmap when it detects that more than one routable way was added (with res 24) for one OSM way. 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway. The -make-opposite-cycleways option would add the cycle way with the same type as that for the car. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn’t seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can’t see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 16:22 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can’t see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways optionDear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi all, sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways. Gerd Hi Mike, I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway. The -make-opposite-cycleways option would add the cycle way with the same type as that for the car. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn’t seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can’t see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 16:22 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can’t see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways optionDear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I suggest it might be more useful to make it a more general purpose option for affecting the order of precedence used with the continue statement, something like mkgmap:precedence=<integer> where negative number are added before positive ones and the default precedence is 0. This would allow you to specify a road, bridge and cycleway on the same highway segment and specify what order they should be created in. Alternatively, the precedence could be specified as part of the continue statement e.g [0x10 road_class=0 road_speed=0 resolution 24 continue precedence=1] would mean create after all the matches have been completed Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 March 2015 09:12 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] FW: --make-opposite-cycleways option Hi all, sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways. Gerd _____ Hi Mike, I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway. The -make-opposite-cycleways option would add the cycle way with the same type as that for the car. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 16:22 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? Gerd From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, yes, also sounds like a good idea to me, but doesn't solve the initial problem regarding routing in the cycleway. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Sat, 7 Mar 2015 13:07:47 +0000 Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Gerd, I suggest it might be more useful to make it a more general purpose option for affecting the order of precedence used with the continue statement, something like mkgmap:precedence=<integer> where negative number are added before positive ones and the default precedence is 0. This would allow you to specify a road, bridge and cycleway on the same highway segment and specify what order they should be created in. Alternatively, the precedence could be specified as part of the continue statement e.g [0x10 road_class=0 road_speed=0 resolution 24 continue precedence=1] would mean create after all the matches have been completed Regards,MikeFrom: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 March 2015 09:12 To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] FW: --make-opposite-cycleways option Hi all, sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways. Gerd Hi Mike, I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway. The -make-opposite-cycleways option would add the cycle way with the same type as that for the car. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn’t seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can’t see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 16:22 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can’t see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways optionHI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards,Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? GerdFrom: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways optionDear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

HI Gerd, I have now investigated further and have discovered that the difference between my lines file that works and the default that doesn't is that I don't include inc/roadspeed. The setting of mkgmap:road-speed-class in this file seems to break the routing when an opposite cycleway is added from the style file. This setting is not mentioned in the style manual, so I don't know what it is supposed to do. Can you take a look at this? Thanks, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 March 2015 18:29 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Mike, yes, also sounds like a good idea to me, but doesn't solve the initial problem regarding routing in the cycleway. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Sat, 7 Mar 2015 13:07:47 +0000 Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Gerd, I suggest it might be more useful to make it a more general purpose option for affecting the order of precedence used with the continue statement, something like mkgmap:precedence=<integer> where negative number are added before positive ones and the default precedence is 0. This would allow you to specify a road, bridge and cycleway on the same highway segment and specify what order they should be created in. Alternatively, the precedence could be specified as part of the continue statement e.g [0x10 road_class=0 road_speed=0 resolution 24 continue precedence=1] would mean create after all the matches have been completed Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 07 March 2015 09:12 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: [mkgmap-dev] FW: --make-opposite-cycleways option Hi all, sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ? The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways. Gerd _____ Hi Mike, I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway. The -make-opposite-cycleways option would add the cycle way with the same type as that for the car. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street). highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue] I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)? Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 16:22 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that. The comment is a bit misleading and I think the code for "old-style" is now obsolete as well. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included): public boolean init(ElementSaver saver, EnhancedProperties props) { if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar"); usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); } I gather that route is not an access tag, so I agree that it should not be included. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 04 March 2015 05:31 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch. Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck"); Please explain why you remove route=* . I think that one should be kept. Gerd _____ From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently. Regards, Mike From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 03 March 2015 08:26 To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Mike, I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out. If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases? Is anybody able to change the default style so that it produces the same result ? Gerd From: mike@tvage.co.uk <mailto:mike@tvage.co.uk> To: mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all, When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it. In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags). I therefore submit the attached patch for trial. Regards, Mike _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, the tag mkgmap:road-speed-class is documented in d:\mkgmap\doc\styles\internal-tags.txt I think it works as documented. Not sure why it breaks routing when it is not used. Gerd Mike Baggaley wrote
HI Gerd, I have now investigated further and have discovered that the difference between my lines file that works and the default that doesn't is that I don't include inc/roadspeed. The setting of mkgmap:road-speed-class in this file seems to break the routing when an opposite cycleway is added from the style file. This setting is not mentioned in the style manual, so I don't know what it is supposed to do. Can you take a look at this?
Thanks, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 07 March 2015 18:29 To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option
Hi Mike,
yes, also sounds like a good idea to me, but doesn't solve the initial problem regarding routing in the cycleway.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Sat, 7 Mar 2015 13:07:47 +0000 Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Gerd, I suggest it might be more useful to make it a more general purpose option for affecting the order of precedence used with the continue statement, something like mkgmap:precedence= <integer> where negative number are added before positive ones and the default precedence is 0. This would allow you to specify a road, bridge and cycleway on the same highway segment and specify what order they should be created in. Alternatively, the precedence could be specified as part of the continue statement e.g [0x10 road_class=0 road_speed=0 resolution 24 continue precedence=1] would mean create after all the matches have been completed
Regards, Mike From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 07 March 2015 09:12 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: [mkgmap-dev] FW: --make-opposite-cycleways option
Hi all,
sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ?
The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways.
Gerd _____
Hi Mike,
I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway.
The -make-opposite-cycleways option would add the cycle way with the same type as that for the car.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street).
highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue]
I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)?
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 04 March 2015 16:22 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that.
The comment is a bit misleading and I think the code for "old-style" is now obsolete as well.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included):
public boolean init(ElementSaver saver, EnhancedProperties props) {
if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar");
usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); }
I gather that route is not an access tag, so I agree that it should not be included.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 04 March 2015 05:31 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch.
Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck");
Please explain why you remove route=* . I think that one should be kept.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 03 March 2015 08:26 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out.
If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases?
Is anybody able to change the default style so that it produces the same result ?
Gerd From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all,
When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it.
In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags).
I therefore submit the attached patch for trial.
Regards, Mike
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/make-opposite-cycleways-option-tp5835586p5836... Sent from the Mkgmap Development mailing list archive at Nabble.com.

HI Gerd, thanks - I didn't spot the entry in the documentation because mkgmap:road-speed-class is displayed over two lines in the PDF document, so searching for it appears not to work. I have now determined that if I also delete maxspeed from the cycleway, so that mkgmap:road-speed-class does not get set in inc/roadspeed, then the routing works correctly. Updated patch attached. Regards, Mike -----Original Message----- From: GerdP [mailto:gpetermann_muenchen@hotmail.com] Sent: 08 March 2015 11:08 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Mike, the tag mkgmap:road-speed-class is documented in d:\mkgmap\doc\styles\internal-tags.txt I think it works as documented. Not sure why it breaks routing when it is not used. Gerd Mike Baggaley wrote
HI Gerd, I have now investigated further and have discovered that the difference between my lines file that works and the default that doesn't is that I don't include inc/roadspeed. The setting of mkgmap:road-speed-class in this file seems to break the routing when an opposite cycleway is added from the style file. This setting is not mentioned in the style manual, so I don't know what it is supposed to do. Can you take a look at this?
Thanks, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 07 March 2015 18:29 To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option
Hi Mike,
yes, also sounds like a good idea to me, but doesn't solve the initial problem regarding routing in the cycleway.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Sat, 7 Mar 2015 13:07:47 +0000 Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Gerd, I suggest it might be more useful to make it a more general purpose option for affecting the order of precedence used with the continue statement, something like mkgmap:precedence= <integer> where negative number are added before positive ones and the default precedence is 0. This would allow you to specify a road, bridge and cycleway on the same highway segment and specify what order they should be created in. Alternatively, the precedence could be specified as part of the continue statement e.g [0x10 road_class=0 road_speed=0 resolution 24 continue precedence=1] would mean create after all the matches have been completed
Regards, Mike From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 07 March 2015 09:12 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: [mkgmap-dev] FW: --make-opposite-cycleways option
Hi all,
sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ?
The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways.
Gerd _____
Hi Mike,
I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway.
The -make-opposite-cycleways option would add the cycle way with the same type as that for the car.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street).
highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue]
I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)?
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 04 March 2015 16:22 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that.
The comment is a bit misleading and I think the code for "old-style" is now obsolete as well.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included):
public boolean init(ElementSaver saver, EnhancedProperties props) {
if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar");
usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); }
I gather that route is not an access tag, so I agree that it should not be included.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 04 March 2015 05:31 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch.
Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck");
Please explain why you remove route=* . I think that one should be kept.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 03 March 2015 08:26 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out.
If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases?
Is anybody able to change the default style so that it produces the same result ?
Gerd From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all,
When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it.
In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags).
I therefore submit the attached patch for trial.
Regards, Mike
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/make-opposite-cycleways-option-tp5835586p5836 256.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Mike, I still don't understand the effect on wrong routing through oneways. Anyway, I don't see that anyone else is interested in changing this option, so maybe I'll just commit the patch that changes mkgmap to delete the tags handled in inc/access. Gerd From: mike@tvage.co.uk To: mkgmap-dev@lists.mkgmap.org.uk Date: Sun, 8 Mar 2015 17:04:27 +0000 Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option HI Gerd, thanks - I didn't spot the entry in the documentation because mkgmap:road-speed-class is displayed over two lines in the PDF document, so searching for it appears not to work. I have now determined that if I also delete maxspeed from the cycleway, so that mkgmap:road-speed-class does not get set in inc/roadspeed, then the routing works correctly. Updated patch attached. Regards, Mike -----Original Message----- From: GerdP [mailto:gpetermann_muenchen@hotmail.com] Sent: 08 March 2015 11:08 To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Mike, the tag mkgmap:road-speed-class is documented in d:\mkgmap\doc\styles\internal-tags.txt I think it works as documented. Not sure why it breaks routing when it is not used. Gerd Mike Baggaley wrote
HI Gerd, I have now investigated further and have discovered that the difference between my lines file that works and the default that doesn't is that I don't include inc/roadspeed. The setting of mkgmap:road-speed-class in this file seems to break the routing when an opposite cycleway is added from the style file. This setting is not mentioned in the style manual, so I don't know what it is supposed to do. Can you take a look at this?
Thanks, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 07 March 2015 18:29 To:
mkgmap-dev@.org
Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option
Hi Mike,
yes, also sounds like a good idea to me, but doesn't solve the initial problem regarding routing in the cycleway.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Sat, 7 Mar 2015 13:07:47 +0000 Subject: Re: [mkgmap-dev] FW: --make-opposite-cycleways option Hi Gerd, I suggest it might be more useful to make it a more general purpose option for affecting the order of precedence used with the continue statement, something like mkgmap:precedence= <integer> where negative number are added before positive ones and the default precedence is 0. This would allow you to specify a road, bridge and cycleway on the same highway segment and specify what order they should be created in. Alternatively, the precedence could be specified as part of the continue statement e.g [0x10 road_class=0 road_speed=0 resolution 24 continue precedence=1] would mean create after all the matches have been completed
Regards, Mike From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 07 March 2015 09:12 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: [mkgmap-dev] FW: --make-opposite-cycleways option
Hi all,
sorry, I hit the send button by mistake. ... Did anybody think about this proposal? 2) Maybe we can replace the --make-opposite-cycleways option by a new special tag like mkgmap:add_cycleway=[before|after] ?
The idea is to change the code in mkgmap so that it doesn't create a copy of the way BEFORE style processing, instead it checks if this tag occurs and adds a copy with bicycle-only and "oneway=no" after style processing. The tag value before / after tells mkgmap if the cycleway should be added before or after the "normal" way. I see only one theoretical problem: if the style adds the same OSM way two or more times with this tag, should we also add multiple cycleways? And where exactly? I think we would have to ignore all sub sequent ways.
Gerd _____
Hi Mike,
I think a possible problem with your patch is that you always add the cycle way with type 0x10, without further checking the attributes of the highway.
The -make-opposite-cycleways option would add the cycle way with the same type as that for the car.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Fri, 6 Mar 2015 00:11:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I added the following to the lines file in my style and it works fine there if I remove the --make-opposite-cycleways option, allowing just cycling and walking against the flow. However, it doesn't seem to work correctly if I add it to the default style (it allows cars to go the wrong way along the one-way street).
highway=* & (oneway=yes | oneway=-1 | oneway=true | oneway=1 | oneway=reverse) & (oneway:bicycle=no | cycleway=opposite | cycleway=opposite_lane | cycleway=opposite_track) {delete oneway; delete cycleway; set access=no; delete foot; delete vehicle; delete motor_vehicle; delete motorcar; delete goods; delete hgv; delete psv; delete emergency; delete taxi; delete bus; add bicycle=yes; set highway=cycleway} [0x10 road_class=0 road_speed=1 resolution 24 continue]
I can't see why this might be happening. Has anyone any ideas (the attached patch is what I changed)?
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 04 March 2015 16:22 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
the style cannot create a way, but it can add multiple routable ways for one OSM way. Use "continue" or "continue with actions" for that.
The comment is a bit misleading and I think the code for "old-style" is now obsolete as well.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Wed, 4 Mar 2015 16:01:56 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option Hi Gerd, I was not clear what you meant by change the style to produce the same result, so I provided a change to the style that with the code changes produces the same result as now. Unless a style can create an extra way, I can't see how a style can be set up to allow cycling in both directions, but other traffic only in one direction without using the extra way created by the --make-opposite-cycleways code. Can a style create a way? I got the list of tags to delete from the following code which suggested that the following lines were all access tags (plus a few tags mentioned elsewhere that I also included):
public boolean init(ElementSaver saver, EnhancedProperties props) {
if (props.getProperty("old-style", false)) { // the access tags need to be loaded if the old style handling // is active and access restrictions are handled by the java // source code and not by the style usedTags.add("access"); usedTags.add("bicycle"); usedTags.add("carpool"); usedTags.add("delivery"); usedTags.add("emergency"); usedTags.add("foot"); usedTags.add("goods"); usedTags.add("hgv"); usedTags.add("motorcar");
usedTags.add("motorcycle"); usedTags.add("psv"); usedTags.add("route"); usedTags.add("taxi"); }
I gather that route is not an access tag, so I agree that it should not be included.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 04 March 2015 05:31 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
as I said, I'd be more happy to have a patch that remove's the option and shows how to change the default style instead to get the same result as with your patch.
Your patch tries to remove all kinds of tags which might lead to wrong routing: + cycleWay.deleteTag("vehicle"); + cycleWay.deleteTag("motor_vehicle"); + cycleWay.deleteTag("carpool"); + cycleWay.deleteTag("delivery"); + cycleWay.deleteTag("emergency"); + cycleWay.deleteTag("foot"); + cycleWay.deleteTag("goods"); + cycleWay.deleteTag("hgv"); + cycleWay.deleteTag("motorcar"); + cycleWay.deleteTag("motorcycle"); + cycleWay.deleteTag("psv"); + cycleWay.deleteTag("route"); + cycleWay.deleteTag("taxi"); + cycleWay.deleteTag("bus"); + cycleWay.deleteTag("truck");
Please explain why you remove route=* . I think that one should be kept.
Gerd _____
From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Tue, 3 Mar 2015 19:45:00 +0000 Subject: Re: [mkgmap-dev] --make-opposite-cycleways option HI Gerd, the attached updated patch adds a line to the default style that can be uncommented if you want to see the opposite cycleway names as they are currently.
Regards, Mike
From: Gerd Petermann [mailto:
gpetermann_muenchen@
] Sent: 03 March 2015 08:26 To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Subject: Re: [mkgmap-dev] --make-opposite-cycleways option
Hi Mike,
I think you are right regarding the access tags. The current solution in combination with the default style might route a truck through the wrong direction of a oneway. Thanks for pointing this out.
If I got it right, most style developers don't use this option, they prefer to have the logic in the rules. Maybe this is another argument to remove the option instead of adding code to make it work in special cases?
Is anybody able to change the default style so that it produces the same result ?
Gerd From:
mike@.co
<mailto:
mike@.co
> To:
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> Date: Mon, 2 Mar 2015 22:46:07 +0000 Subject: [mkgmap-dev] --make-opposite-cycleways option Dear all,
When using the --make-opposite-cycleways option, I notice that the address index adds a road name of the actual road name suffixed with " (cycleway)". For me at least, this is undesirable. Also the generated name does not conform to the OSM naming convention of not including any descriptive information in names. I therefore propose that the name of an opposite cycleway be set to the same as the original road name, and that users who want to name the opposite cycleway differently should use the style file to rename it.
In looking at the code that produces the opposite cycleway, I also believe there is an error in the way it handles access tags - the code currently sets access=no, bicycle=yes and foot=no, but ignores all other access tags. Hence if (for example) the road has psv=yes on it, the generated cycleway will also have psv=yes (unless I am misunderstanding something in the handling of access tags).
I therefore submit the attached patch for trial.
Regards, Mike
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
<mailto:
mkgmap-dev@.org
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/make-opposite-cycleways-option-tp5835586p5836 256.html Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (4)
-
Gerd Petermann
-
GerdP
-
Mike Baggaley
-
Minko