Duplicate roads added by default style

Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd

hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann < GPetermann_muenchen@hotmail.com> wrote:
Hi all,
while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23]
Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that?
Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org

It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com> wrote:
hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice.
On Mon, 10 May 2021 at 16:49, Gerd Petermann < GPetermann_muenchen@hotmail.com> wrote:
Hi all,
while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23]
Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that?
Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org
-- Felix Hartman - Openmtbmap.org & VeloMap.org

Hi Felix, sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option. I think it's worth to log a warning for each. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com<mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>> wrote: Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Felix Hartman - Openmtbmap.org & VeloMap.org -- Felix Hartman - Openmtbmap.org & VeloMap.org

Hi all Maybe railway=platform shouldn't generate a routable line. Pure duplication of (parts of) roads with identical Garmin img attributes could be suppressed. These could come from duplication by the style or distinct OSM ways. In the case of platform=railway, I'd have thought it to be better mapping to have a distinct OSM way when a navigable route uses a platform. I don't have strong feelings about warnings or not for this case. Ticker On Mon, 2021-05-10 at 09:21 +0000, Gerd Petermann wrote:
Hi Felix,
sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option.
I think it's worth to log a warning for each.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style
It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen.
On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com <mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice.
On Mon, 10 May 2021 at 16:49, Gerd Petermann < GPetermann_muenchen@hotmail.com<mailto: GPetermann_muenchen@hotmail.com>> wrote: Hi all,
while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23]
Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that?
Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org
-- Felix Hartman - Openmtbmap.org & VeloMap.org
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi all, in my area a lot platforms have highway=platform and railway=platform, and the default style adds a routable way for both. The default style could be fixed with railway=platform & tmp:stopMopUp!=yes [0x16 road_class=0 road_speed=0 resolution 23] instead of railway=platform [0x16 road_class=0 road_speed=0 resolution 23] The code to find duplicate roads for the same OSM way is rather simple. I could add more code to find this issue for other objects (points, shapes, other lines) as well but I guess roads are the most important? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Montag, 10. Mai 2021 11:51 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style Hi all Maybe railway=platform shouldn't generate a routable line. Pure duplication of (parts of) roads with identical Garmin img attributes could be suppressed. These could come from duplication by the style or distinct OSM ways. In the case of platform=railway, I'd have thought it to be better mapping to have a distinct OSM way when a navigable route uses a platform. I don't have strong feelings about warnings or not for this case. Ticker On Mon, 2021-05-10 at 09:21 +0000, Gerd Petermann wrote:
Hi Felix,
sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option.
I think it's worth to log a warning for each.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style
It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen.
On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com <mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice.
On Mon, 10 May 2021 at 16:49, Gerd Petermann < GPetermann_muenchen@hotmail.com<mailto: GPetermann_muenchen@hotmail.com>> wrote: Hi all,
while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23]
Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that?
Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org
-- Felix Hartman - Openmtbmap.org & VeloMap.org
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd This is incorrect tagging. highway=platform should be used just for bus or tram, not for railway. However, no problem with your change to the default style. I don't think it is worthwhile extending de-duplication to other elements; just the strange cases that road-merger throws up. Ticker On Mon, 2021-05-10 at 10:04 +0000, Gerd Petermann wrote:
Hi all,
in my area a lot platforms have highway=platform and railway=platform, and the default style adds a routable way for both.
The default style could be fixed with railway=platform & tmp:stopMopUp!=yes [0x16 road_class=0 road_speed=0 resolution 23] instead of railway=platform [0x16 road_class=0 road_speed=0 resolution 23]
The code to find duplicate roads for the same OSM way is rather simple. I could add more code to find this issue for other objects (points, shapes, other lines) as well but I guess roads are the most important?
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Montag, 10. Mai 2021 11:51 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style
Hi all
Maybe railway=platform shouldn't generate a routable line.
Pure duplication of (parts of) roads with identical Garmin img attributes could be suppressed. These could come from duplication by the style or distinct OSM ways. In the case of platform=railway, I'd have thought it to be better mapping to have a distinct OSM way when a navigable route uses a platform.
I don't have strong feelings about warnings or not for this case.
Ticker
On Mon, 2021-05-10 at 09:21 +0000, Gerd Petermann wrote:
Hi Felix,
sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option.
I think it's worth to log a warning for each.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style
It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen.
On Mon, 10 May 2021 at 17:14, Felix Hartmann < extremecarver@gmail.com <mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice.
On Mon, 10 May 2021 at 16:49, Gerd Petermann < GPetermann_muenchen@hotmail.com<mailto: GPetermann_muenchen@hotmail.com>> wrote: Hi all,
while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23]
Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that?
Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto: mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- Felix Hartman - Openmtbmap.org & VeloMap.org
-- Felix Hartman - Openmtbmap.org & VeloMap.org
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

HI Gerd, I would ideally like a new mkgmap tag that if found would remove the duplicated way or part of a way. This could get tricky when the part to be deleted is in the middle of the way, as it would need to produce two ways. Something like: railway=platform {set mkgmap:removeoverlap=true} [0x16 road_class=0 road_speed=0 resolution 23] The code would need to check that the access of the overlapping way and could merge the accesses if necessary. A decision would also have to be made what to do if two overlapping ways both have the tag set. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 10:21 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Felix, sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option. I think it's worth to log a warning for each. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com<mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>> wrote: Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Felix Hartman - Openmtbmap.org & VeloMap.org -- Felix Hartman - Openmtbmap.org & VeloMap.org

Hi Mike, Please give an example, I don't understand what you mean. Do you talk about the situation that two OSM ways are overlapping (sharing segments)? That would be a completely different problem and requires a different check which maybe also looks at the layer=* tag. The issue here is that the style adds multiple identical routable lines for the same OSM way. Those duplicates would just blows up the road network and therefore can be safely ignored. The attached patch is like v5 but contains the additional check in StyledConverter. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Montag, 10. Mai 2021 16:56 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Duplicate roads added by default style HI Gerd, I would ideally like a new mkgmap tag that if found would remove the duplicated way or part of a way. This could get tricky when the part to be deleted is in the middle of the way, as it would need to produce two ways. Something like: railway=platform {set mkgmap:removeoverlap=true} [0x16 road_class=0 road_speed=0 resolution 23] The code would need to check that the access of the overlapping way and could merge the accesses if necessary. A decision would also have to be made what to do if two overlapping ways both have the tag set. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 10:21 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Felix, sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option. I think it's worth to log a warning for each. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com<mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>> wrote: Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Felix Hartman - Openmtbmap.org & VeloMap.org -- Felix Hartman - Openmtbmap.org & VeloMap.org _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I misunderstood the problem you were discussing - I was indeed referring to overlapping ways from different OSM ways. The multiple ways from the same OSM way is not a problem for me in the style I use (I think - I haven't enabled any logging of this so perhaps might not have noticed). Overlapping ways from different OSM ways is however a problem I have. Mainly because I include routing around car parks and some car parks have part of their outline coincident with a road. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 16:07 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Mike, Please give an example, I don't understand what you mean. Do you talk about the situation that two OSM ways are overlapping (sharing segments)? That would be a completely different problem and requires a different check which maybe also looks at the layer=* tag. The issue here is that the style adds multiple identical routable lines for the same OSM way. Those duplicates would just blows up the road network and therefore can be safely ignored. The attached patch is like v5 but contains the additional check in StyledConverter. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Montag, 10. Mai 2021 16:56 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Duplicate roads added by default style HI Gerd, I would ideally like a new mkgmap tag that if found would remove the duplicated way or part of a way. This could get tricky when the part to be deleted is in the middle of the way, as it would need to produce two ways. Something like: railway=platform {set mkgmap:removeoverlap=true} [0x16 road_class=0 road_speed=0 resolution 23] The code would need to check that the access of the overlapping way and could merge the accesses if necessary. A decision would also have to be made what to do if two overlapping ways both have the tag set. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 10:21 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Felix, sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option. I think it's worth to log a warning for each. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com<mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>> wrote: Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Felix Hartman - Openmtbmap.org & VeloMap.org -- Felix Hartman - Openmtbmap.org & VeloMap.org _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Mike, maybe you can use the code for --report-similar-arcs as a base to detect and possible drop identical arcs? Didn't try it, I have no idea if that may create incorrect NOD data. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Montag, 10. Mai 2021 17:15 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Duplicate roads added by default style Hi Gerd, I misunderstood the problem you were discussing - I was indeed referring to overlapping ways from different OSM ways. The multiple ways from the same OSM way is not a problem for me in the style I use (I think - I haven't enabled any logging of this so perhaps might not have noticed). Overlapping ways from different OSM ways is however a problem I have. Mainly because I include routing around car parks and some car parks have part of their outline coincident with a road. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 16:07 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Mike, Please give an example, I don't understand what you mean. Do you talk about the situation that two OSM ways are overlapping (sharing segments)? That would be a completely different problem and requires a different check which maybe also looks at the layer=* tag. The issue here is that the style adds multiple identical routable lines for the same OSM way. Those duplicates would just blows up the road network and therefore can be safely ignored. The attached patch is like v5 but contains the additional check in StyledConverter. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Montag, 10. Mai 2021 16:56 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Duplicate roads added by default style HI Gerd, I would ideally like a new mkgmap tag that if found would remove the duplicated way or part of a way. This could get tricky when the part to be deleted is in the middle of the way, as it would need to produce two ways. Something like: railway=platform {set mkgmap:removeoverlap=true} [0x16 road_class=0 road_speed=0 resolution 23] The code would need to check that the access of the overlapping way and could merge the accesses if necessary. A decision would also have to be made what to do if two overlapping ways both have the tag set. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 10:21 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Felix, sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option. I think it's worth to log a warning for each. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com<mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>> wrote: Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Felix Hartman - Openmtbmap.org & VeloMap.org -- Felix Hartman - Openmtbmap.org & VeloMap.org _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I had been thinking along those lines, but when I saw the previous posts thought someone else was looking into the same problem. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 11 May 2021 10:19 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Mike, maybe you can use the code for --report-similar-arcs as a base to detect and possible drop identical arcs? Didn't try it, I have no idea if that may create incorrect NOD data. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Montag, 10. Mai 2021 17:15 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Duplicate roads added by default style Hi Gerd, I misunderstood the problem you were discussing - I was indeed referring to overlapping ways from different OSM ways. The multiple ways from the same OSM way is not a problem for me in the style I use (I think - I haven't enabled any logging of this so perhaps might not have noticed). Overlapping ways from different OSM ways is however a problem I have. Mainly because I include routing around car parks and some car parks have part of their outline coincident with a road. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 16:07 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Mike, Please give an example, I don't understand what you mean. Do you talk about the situation that two OSM ways are overlapping (sharing segments)? That would be a completely different problem and requires a different check which maybe also looks at the layer=* tag. The issue here is that the style adds multiple identical routable lines for the same OSM way. Those duplicates would just blows up the road network and therefore can be safely ignored. The attached patch is like v5 but contains the additional check in StyledConverter. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike@tvage.co.uk> Gesendet: Montag, 10. Mai 2021 16:56 An: 'Development list for mkgmap' Betreff: Re: [mkgmap-dev] Duplicate roads added by default style HI Gerd, I would ideally like a new mkgmap tag that if found would remove the duplicated way or part of a way. This could get tricky when the part to be deleted is in the middle of the way, as it would need to produce two ways. Something like: railway=platform {set mkgmap:removeoverlap=true} [0x16 road_class=0 road_speed=0 resolution 23] The code would need to check that the access of the overlapping way and could merge the accesses if necessary. A decision would also have to be made what to do if two overlapping ways both have the tag set. Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:gpetermann_muenchen@hotmail.com] Sent: 10 May 2021 10:21 To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Duplicate roads added by default style Hi Felix, sure, I meant roads which RoadMerger would combine. Roadmerger checks a lot more attributes. Multiple (different) routable ways for one OSM way are quite normal, esp. with the --make-opposite-cycleways option. I think it's worth to log a warning for each. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver@gmail.com> Gesendet: Montag, 10. Mai 2021 11:16 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Duplicate roads added by default style It makes the style very complicated to try to remove any identical copies - I do this by setting loads of temporary keys, that are checked later for existing or not existing and based on that add or not add other lines. I guess some actual duplicates will still happen. On Mon, 10 May 2021 at 17:14, Felix Hartmann <extremecarver@gmail.com<mailto:extremecarver@gmail.com>> wrote: hmm no, please no warning. This can be very beneficial. As long as the type OR road_speed OR road_class OR oneway plus direction is different. The above of course makes no sense, as it will set exactly the same road twice. On Mon, 10 May 2021 at 16:49, Gerd Petermann <GPetermann_muenchen@hotmail.com<mailto:GPetermann_muenchen@hotmail.com>> wrote: Hi all, while double checking patch for the RoadMerger I wondered what might happen if the style adds two or more identical roads for the same OSM way. Of course this makes no sense but to my surprise I found out that this really happens with the default style. A way with e.g. highway=footway and railway=platform is added twice ... highway=footway {set tmp:stopMopUp=yes} [0x16 road_class=0 road_speed=0 resolution 23 continue with_actions] ... railway=platform [0x16 road_class=0 road_speed=0 resolution 23] Of course the default style should be fixed to avoid that but I think mkgmap can detect this easily and should print a warning when the style does that? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -- Felix Hartman - Openmtbmap.org & VeloMap.org -- Felix Hartman - Openmtbmap.org & VeloMap.org _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (5)
-
Felix Hartmann
-
Gerd Petermann
-
Gerd Petermann
-
Mike Baggaley
-
Ticker Berkin