logo separator

[mkgmap-dev] special case where splitting fails without a log message

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed May 26 09:46:35 BST 2021

Hi Ticker,

OK, I think your patch improves some cases. I've also fixed another potential cause for these problems with r4744.

I think I have to find a way to avoid those segments which are visited multiple times in the same direction. There's probably always an alternative merge order that avoids this.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Mittwoch, 26. Mai 2021 10:36
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] special case where splitting fails without a log message

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

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list