Multiple pass cleanup possible with style?

Is it possible to run through certain parts of the style more than once? Use model: To reduce sizes I {deletealltags} of some small objects that I deem not important. However this sometimes ends up leaving some orphan ways that are no longer connected to anything. I'd like to delete these ways too, but seems like it does everything in one pass so these get left despite having a rule to remove them. How would one do something like this? I don't think I want to do this more than a few times but cleaning up the self-inflicted orphaned ways would be helpful. Thanks!

Hi, not sure what exactly you want to do, but I think the special tags mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type help to solve your problem. With thoe you can define that a road should be removed or just be rendered as a non-routable line if it is not connected to other roads or only connected to one other road. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Freitag, 22. Juli 2022 16:26 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Multiple pass cleanup possible with style? Is it possible to run through certain parts of the style more than once? Use model: To reduce sizes I {deletealltags} of some small objects that I deem not important. However this sometimes ends up leaving some orphan ways that are no longer connected to anything. I'd like to delete these ways too, but seems like it does everything in one pass so these get left despite having a rule to remove them. How would one do something like this? I don't think I want to do this more than a few times but cleaning up the self-inflicted orphaned ways would be helpful. Thanks! _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I've used the mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type to delete already one- and no-connnect ways in the OSM data, and that has been helpful, but sometimes I delete ways that are connected both ends, with the implication that something now that used to be connected on both ends is connected only on one end now, and something else that was connected on one end may now be not connected on either end. I think a specific use case is that I find a 2-connect low priority way (like service=driveway) that passes through a private building or is very short. Ideally I would like to simply delete all of them but this is just a heuristic to reduce file sizes. Anyway, I delete that way, but that way continues on connected to something else, but now that way is newly 1- or 0-connect, and I want that removed too. Of course there are two halves left when removing a 2-connect way, but it should be easy enough to determine the lower class way (another driveway) is the one that should also be trimmed. (One exact issue is that someone has a loop driveway with both ends connected to a residential road, and the loop driveway has an offshoot. Removing the driveway would leave the offshoot dangling -- originally one connect, now zero connect due to deletion of the loop -- and that I would also like to remove.) Is something like this possible? On Fri, 22 Jul 2022, Gerd Petermann wrote:
Date: Fri, 22 Jul 2022 15:35:43 +0000 From: Gerd Petermann <gpetermann_muenchen@hotmail.com> Reply-To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Multiple pass cleanup possible with style?
Hi,
not sure what exactly you want to do, but I think the special tags mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type help to solve your problem.
With thoe you can define that a road should be removed or just be rendered as a non-routable line if it is not connected to other roads or only connected to one other road.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Freitag, 22. Juli 2022 16:26 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Multiple pass cleanup possible with style?
Is it possible to run through certain parts of the style more than once?
Use model:
To reduce sizes I {deletealltags} of some small objects that I deem not important. However this sometimes ends up leaving some orphan ways that are no longer connected to anything. I'd like to delete these ways too, but seems like it does everything in one pass so these get left despite having a rule to remove them.
How would one do something like this? I don't think I want to do this more than a few times but cleaning up the self-inflicted orphaned ways would be helpful.
Thanks! _______________________________________________ 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
WARNING: All HTML emails get auto deleted. DO NOT SEND HTML MAIL. WARNING: Emails with large typo counts/spelling errors will also be deleted.

I am pretty sure that you don't understand the meaning of the special tags. Your style tells mkgmap which ways are roads. So, only after passing all OSM ways through your style mkgmap can calculate the road network and only at this time it is possible to detect unconnected or "semi-connected" roads and use the value of the special tags to decide what to do with special cases. My understanding of your text is that you expect the special tags to contain an information like "this OSM way is connected to the road network" but that's not the case. The program mkgmap reads the variables, it doesn't set them. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Freitag, 22. Juli 2022 21:00 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Multiple pass cleanup possible with style? I've used the mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type to delete already one- and no-connnect ways in the OSM data, and that has been helpful, but sometimes I delete ways that are connected both ends, with the implication that something now that used to be connected on both ends is connected only on one end now, and something else that was connected on one end may now be not connected on either end. I think a specific use case is that I find a 2-connect low priority way (like service=driveway) that passes through a private building or is very short. Ideally I would like to simply delete all of them but this is just a heuristic to reduce file sizes. Anyway, I delete that way, but that way continues on connected to something else, but now that way is newly 1- or 0-connect, and I want that removed too. Of course there are two halves left when removing a 2-connect way, but it should be easy enough to determine the lower class way (another driveway) is the one that should also be trimmed. (One exact issue is that someone has a loop driveway with both ends connected to a residential road, and the loop driveway has an offshoot. Removing the driveway would leave the offshoot dangling -- originally one connect, now zero connect due to deletion of the loop -- and that I would also like to remove.) Is something like this possible? On Fri, 22 Jul 2022, Gerd Petermann wrote:
Date: Fri, 22 Jul 2022 15:35:43 +0000 From: Gerd Petermann <gpetermann_muenchen@hotmail.com> Reply-To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Multiple pass cleanup possible with style?
Hi,
not sure what exactly you want to do, but I think the special tags mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type help to solve your problem.
With thoe you can define that a road should be removed or just be rendered as a non-routable line if it is not connected to other roads or only connected to one other road.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Freitag, 22. Juli 2022 16:26 An: mkgmap-dev@lists.mkgmap.org.uk Betreff: [mkgmap-dev] Multiple pass cleanup possible with style?
Is it possible to run through certain parts of the style more than once?
Use model:
To reduce sizes I {deletealltags} of some small objects that I deem not important. However this sometimes ends up leaving some orphan ways that are no longer connected to anything. I'd like to delete these ways too, but seems like it does everything in one pass so these get left despite having a rule to remove them.
How would one do something like this? I don't think I want to do this more than a few times but cleaning up the self-inflicted orphaned ways would be helpful.
Thanks! _______________________________________________ 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
WARNING: All HTML emails get auto deleted. DO NOT SEND HTML MAIL. WARNING: Emails with large typo counts/spelling errors will also be deleted. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I'm not sure the issue is clear. The problem is I delete objects that once was fully connected (both ends are connected but meets other criteria for deletion) but after deleting that object, the remaining objects now have a different status - and these now need to be cleaned up based by my rules ... which as I understand would require a second pass through the style (which is problematic of course, but that's another issue). This is because a way that used to be fully connected is could now only connected on one end, and some ways that were only connected on one end is now connected on neither end. The OSM-ways I want to delete may not have met the requirements on the first pass, but now do after the initial pruning. If this is simply not possible, that's all I need to know. Sounds like this is the case. On Fri, 22 Jul 2022, Gerd Petermann wrote:
Date: Fri, 22 Jul 2022 19:24:48 +0000 From: Gerd Petermann <gpetermann_muenchen@hotmail.com> Reply-To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Multiple pass cleanup possible with style?
I am pretty sure that you don't understand the meaning of the special tags. Your style tells mkgmap which ways are roads. So, only after passing all OSM ways through your style mkgmap can calculate the road network and only at this time it is possible to detect unconnected or "semi-connected" roads and use the value of the special tags to decide what to do with special cases.
My understanding of your text is that you expect the special tags to contain an information like "this OSM way is connected to the road network" but that's not the case. The program mkgmap reads the variables, it doesn't set them.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Freitag, 22. Juli 2022 21:00 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Multiple pass cleanup possible with style?
I've used the mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type to delete already one- and no-connnect ways in the OSM data, and that has been helpful, but sometimes I delete ways that are connected both ends, with the implication that something now that used to be connected on both ends is connected only on one end now, and something else that was connected on one end may now be not connected on either end.
I think a specific use case is that I find a 2-connect low priority way (like service=driveway) that passes through a private building or is very short. Ideally I would like to simply delete all of them but this is just a heuristic to reduce file sizes. Anyway, I delete that way, but that way continues on connected to something else, but now that way is newly 1- or 0-connect, and I want that removed too. Of course there are two halves left when removing a 2-connect way, but it should be easy enough to determine the lower class way (another driveway) is the one that should also be trimmed.
(One exact issue is that someone has a loop driveway with both ends connected to a residential road, and the loop driveway has an offshoot. Removing the driveway would leave the offshoot dangling -- originally one connect, now zero connect due to deletion of the loop -- and that I would also like to remove.)
Is something like this possible?

It is possible and my understanding is that the special tags work well. Please give an example (link to the OSM way that your style doesn't convert to a routable line) and a link to the OSM way(s) that mkgmap doesn't change because of the setting in tag mkgmap:set_unconnected_type or mkgmap:set_semi_connected_type. Describe exactly what you expect to happen and what happens instead. Something like My style adds the tag mkgmap:set_semi_connected_type=none to way 12345678 and the way should only be connected to 4711 but mkgmap still add's it to the map with the type 0x07. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Samstag, 23. Juli 2022 01:48 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Multiple pass cleanup possible with style? I'm not sure the issue is clear. The problem is I delete objects that once was fully connected (both ends are connected but meets other criteria for deletion) but after deleting that object, the remaining objects now have a different status - and these now need to be cleaned up based by my rules ... which as I understand would require a second pass through the style (which is problematic of course, but that's another issue). This is because a way that used to be fully connected is could now only connected on one end, and some ways that were only connected on one end is now connected on neither end. The OSM-ways I want to delete may not have met the requirements on the first pass, but now do after the initial pruning. If this is simply not possible, that's all I need to know. Sounds like this is the case. On Fri, 22 Jul 2022, Gerd Petermann wrote:
Date: Fri, 22 Jul 2022 19:24:48 +0000 From: Gerd Petermann <gpetermann_muenchen@hotmail.com> Reply-To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> To: Development list for mkgmap <mkgmap-dev@lists.mkgmap.org.uk> Subject: Re: [mkgmap-dev] Multiple pass cleanup possible with style?
I am pretty sure that you don't understand the meaning of the special tags. Your style tells mkgmap which ways are roads. So, only after passing all OSM ways through your style mkgmap can calculate the road network and only at this time it is possible to detect unconnected or "semi-connected" roads and use the value of the special tags to decide what to do with special cases.
My understanding of your text is that you expect the special tags to contain an information like "this OSM way is connected to the road network" but that's not the case. The program mkgmap reads the variables, it doesn't set them.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von blc <blc+mkgmap@mail.vanade.com> Gesendet: Freitag, 22. Juli 2022 21:00 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Multiple pass cleanup possible with style?
I've used the mkgmap:set_unconnected_type and mkgmap:set_semi_connected_type to delete already one- and no-connnect ways in the OSM data, and that has been helpful, but sometimes I delete ways that are connected both ends, with the implication that something now that used to be connected on both ends is connected only on one end now, and something else that was connected on one end may now be not connected on either end.
I think a specific use case is that I find a 2-connect low priority way (like service=driveway) that passes through a private building or is very short. Ideally I would like to simply delete all of them but this is just a heuristic to reduce file sizes. Anyway, I delete that way, but that way continues on connected to something else, but now that way is newly 1- or 0-connect, and I want that removed too. Of course there are two halves left when removing a 2-connect way, but it should be easy enough to determine the lower class way (another driveway) is the one that should also be trimmed.
(One exact issue is that someone has a loop driveway with both ends connected to a residential road, and the loop driveway has an offshoot. Removing the driveway would leave the offshoot dangling -- originally one connect, now zero connect due to deletion of the loop -- and that I would also like to remove.)
Is something like this possible?
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
blc
-
Gerd Petermann