
Hi Ticker, doesn't help much with the low-res-opt branch. I've attached a patch which contains my test code. It writes gpx files, so please modify the path. I use it with in Eclipse a breakpoint on the line log.error("split failed, ratio:", ratio); to be able to load the GPX files into JOSM for further analyses. I use it with my precomp-sea test-environment, see http://gis.19327.n8.nabble.com/precomp-sea-test-environment-tt5974624.html options: --output-dir=e:\ld --gmapi --precomp-sea=f:\osm\sea.zip --max-jobs=1 --style-file=e:\precomp-sea-check\sea-check -c e:\precomp-sea-check\tiles\template.args or with the files in https://files.mkgmap.org.uk/download/507/xxx.zip and options --output-dir=e:\ld --gmapi --generate-sea=multipolygon,floodblocker --max-jobs=1 --preserve-element-order --allow-reverse-merge -c e:\xxx\template.args If I got that right your algo has problems when the polygon goes through points A and B twice, once in A-B direction and and again in B-A and the cut is between A and B? I try to find efficient code to detect and avoid just those. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 25. Mai 2021 18:49 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message Sorry - excess stuff in patch, correct one now. Ticker On Tue, 2021-05-25 at 17:46 +0100, Ticker Berkin wrote:
Hi Gerd
Patch attached that I hope fixes the splitting problem.
I haven't looked at your change yet, but your split-failed.osm test had, and needed, lots of points visited twice and I don't see how this can, or should, be avoided.
Ticker
On Tue, 2021-05-25 at 15:56 +0000, Gerd Petermann wrote:
Hi Ticker,
with the attached patch ShapeMerger avoids to produce shapes where more than the start point is visited twice. This produces much larger img files (even larger than trunk) but PolygonSplitter doesn't complain.
I have to find out what GpsMapEdit means with "has a jitter". Maybe only those are problematic.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 25. Mai 2021 14:00 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message
Sorry - sea.zip!
On Tue, 2021-05-25 at 12:36 +0100, Ticker Berkin wrote:
Hi Gerd
I'm getting very confused by this. When I build with my trunk (some filter order changes + a few others), I see a whole lot more that JOSM shows. It and your 6324001.img just show a central bit. Looking with GPSMapEdit with "Highlight Polygon Contours". I also see areas where all islands are inverted.
I'll undo my trunk changes and look again.
Does JOSM have self-intersection checking?
Was the gpx trace hi-res (30bit) and then this kept when generating the osm. If not, then I'd expect problems.
Ticker
On Tue, 2021-05-25 at 11:18 +0000, Gerd Petermann wrote:
Hi Ticker,
I didn't investigate the details. I've created the osm data by converting a gpx back to osm. I guess in the original input duplicate points are identical. I found more such cases where parts are removed.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Dienstag, 25. Mai 2021 12:51 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message
Hi Gerd
OK - I've reproduced this. Is split-failed.osm self -intersecting? I'm not sure how to tell from Josm, but it looks like it isn't. I get the messages from shapeSplitter because it thinks it is and then the result is not good - as expected.
I'll investigate more.
Ticker
On Tue, 2021-05-25 at 10:04 +0000, Gerd Petermann wrote:
Hi Ticker,
while looking at the problems with sea I found this case where ShapeSplitter removes a small part of an island from a self -intersecting polygon in res 24. Compiled with mkgmap from trunk, default style and no options.
Look at 67.6742611, 14.6783525
Found this with some check code that compares the area of the original polygon with that of sum of the parts.
Gerd _______________________________________________ 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
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev