[mkgmap-dev] special case where splitting fails without a log message
From Ticker Berkin rwb-mkgmap at jagit.co.uk on Fri May 28 06:43:06 BST 2021
Hi Gerd There is something about "water.osm" that is breaking the original logic of ShapeSplitter in a way I'm having trouble understanding. A whole lot of points get assigned to 2 loops. It doesn't seem to be related to multiple identical paths around the cut-line, which should now work correctly with this patch - sorry about the 2 failed attempts yesterday. You mentioned slightly adjusting the high-prec values to help shapeSplitter. I think it best not to do this. You'd have to get it absolutely correct all the way through and, say, in cases where 3 lines follow the same path it becomes impossible. Also the algo it makes some decisions on very fine distinctions in areas which allow it to get rid of spikes and similar and so this wouldn't happen. Patch attached. with INFO/DEBUG enabled, it generates lots of gps traces: original, the various loops either side of the cut-line and all the resultant shapes. Ticker On Fri, 2021-05-28 at 05:03 +0000, Gerd Petermann wrote: > 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 at lists.mkgmap.org.uk> im Auftrag > von Gerd Petermann <gpetermann_muenchen at 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 at lists.mkgmap.org.uk> im Auftrag > von Gerd Petermann <gpetermann_muenchen at 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 at lists.mkgmap.org.uk> im Auftrag > von Ticker Berkin <rwb-mkgmap at 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 at lists.mkgmap.org.uk> im Auftrag > > von Ticker Berkin <rwb-mkgmap at 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 at lists.mkgmap.org.uk> im > > > Auftrag > > > von Ticker Berkin <rwb-mkgmap at 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 at lists.mkgmap.org.uk> im > > > > Auftrag > > > > von Ticker Berkin <rwb-mkgmap at 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 at lists.mkgmap.org.uk> im > > > > > Auftrag > > > > > von Ticker Berkin <rwb-mkgmap at 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 at lists.mkgmap.org.uk > > > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > > > _______________________________________________ > > > > > mkgmap-dev mailing list > > > > > mkgmap-dev at lists.mkgmap.org.uk > > > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > > _______________________________________________ > > > > mkgmap-dev mailing list > > > > mkgmap-dev at lists.mkgmap.org.uk > > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > > _______________________________________________ > > > > mkgmap-dev mailing list > > > > mkgmap-dev at lists.mkgmap.org.uk > > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > _______________________________________________ > > > mkgmap-dev mailing list > > > mkgmap-dev at lists.mkgmap.org.uk > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > _______________________________________________ > > > mkgmap-dev mailing list > > > mkgmap-dev at lists.mkgmap.org.uk > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > _______________________________________________ > > mkgmap-dev mailing list > > mkgmap-dev at lists.mkgmap.org.uk > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > _______________________________________________ > > mkgmap-dev mailing list > > mkgmap-dev at lists.mkgmap.org.uk > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: splitShapeFix_4.patch Type: text/x-patch Size: 10086 bytes Desc: not available URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20210528/0ef81bfe/attachment-0001.bin>
- Previous message: [mkgmap-dev] special case where splitting fails without a log message
- Next message: [mkgmap-dev] special case where splitting fails without a log message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list