
Hi Ticker, I've probably not understood the problem before. I've added test code to find situations where the ShapeSplitter complains and I found a rather simple case where the ShapeMerger produces a self-crossing shape (see attached gpx). Now I have an idea what to look for. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Donnerstag, 27. Mai 2021 18:14 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message Hi Ticker, I've attached my current state of work as patch for the branch. It fixes some bugs and merges shapes in a way that is less likely to produce long connections to islands. I think the main problem for shape splitter is when such a connection has a U-shape and the cut goes through it horizontally. But I'm just guessing... Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Gerd Petermann <gpetermann_muenchen@hotmail.com> Gesendet: Donnerstag, 27. Mai 2021 17:59 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message Hi Ticker, JOSM shows the islands properly when you zoom in. And yes, it shows water on both sides of the connecting lines. Very simiar to the Garmin renderer. Does that help? Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 27. Mai 2021 17:48 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message Hi Gerd I'm confused. After mp hole cutting and shape merging, I expect a single closed way that will have in/out lines, probably on top of each other, to connect each area that was a hole, eventually, to a point on the outside of the shape. However, JOSM does show the water band on the outside of what were the islands, and on both sides of the joining lines. Ticker On Thu, 2021-05-27 at 15:10 +0000, Gerd Petermann wrote:
Hi Ticker,
yes, sure. I've converted a gpx output to OSM. All polygons with holes are not valid OSM ways, but they are very normal as MapShape. Validator doesn't help much with these polygons.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 27. Mai 2021 17:06 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message
Hi Gerd
JOSM gives a self-crossing way validation error on this.
Ticker
On Thu, 2021-05-27 at 14:53 +0000, Gerd Petermann wrote:
Hi Ticker,
no need to hurry ;) Here is one: https://files.mkgmap.org.uk/download/508/water.osm
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 27. Mai 2021 16:47 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message
Hi Gerd
next patch also has a problem - sorry to waste your time. Can I have your test data.
Ticker
On Thu, 2021-05-27 at 14:33 +0000, Gerd Petermann wrote:
Hi Ticker,
with my current test environment the patch doesn't improve the result. It reports some errors (the old code didn't always detect them) and eithers add or removes parts of the heavily merged shapes.
I've inspected one shape and found no obvious problem. No point is visited more then twice, but 167 points are visited twice. Let me know if you need the data.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 27. Mai 2021 16:09 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message
Thanks Gerd, that works for me
Ticker
On Thu, 2021-05-27 at 12:54 +0000, Gerd Petermann wrote:
Hi Ticker,
I first convert the gpx layer to a data layer, then add the tag natural=water Next execute validator which will complain that the way is not closed. Right click on that warning allows to "zoom to problem" . This tells you where the first point is.
In the "OSM data" preferences I've enabled "Draw segment order numbers on selected way"
Hope this helps.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 27. Mai 2021 14:21 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message
Hi Gerd
Trying to use JOSM to decide if a gpx trace represents a self -intersecting polygon is difficult. Is there a way of forcing it to consider it closed and then check itself? Failing that, number the points or segments somehow.
Ticker
_______________________________________________ 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 _______________________________________________ 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
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 _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev