[mkgmap-dev] special case where splitting fails without a log message
From Ticker Berkin rwb-mkgmap at jagit.co.uk on Wed May 26 09:36:06 BST 2021
Hi Gerd I hope the only case where my algo still has problems is when 2 lines intersect the cut line at identical points and they have the same area to that side of the line (implying they follow exactly the same path or intersect each other). This should generate the warning: "Lines hit divider at same points and have same area sign" I've been thinking of ways to resolve this and should be possible. If you are not seeing this warning and it is flagging errors, then either another pathological case that I need to consider or it is self -intersecting. My last patch should, I hope, fix the case you mention unless - see above. I stress-tested with GB, trunk. shapeMerge with no point limit and got a few examples of this and some "shape / hole" conflict, which I think might be real self-intersection problems. I'm going to add more diags and generate a gpx when errors/debugEnabled. I was hoping to find a good self-intersection algo, but the ones I thought might be ok are good for detecting line segments that cross but not for when all the difficulties are lines following each other and crossings happen at nodes. Ticker On Wed, 2021-05-26 at 04:46 +0000, Gerd Petermann wrote: > 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.n > 8.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
- 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