Hi Ticker,

I think the big question is what the code is expected to do with overlapping 
polygons. The code in trunk may or may not cut out an inner ring that overlaps 
the outer. If I got that right it was intended to ignore all rings which are 
overlapping, but I showed that this doesn't always work.

So, probably I should change the logic in the branch from
return (x & IsInUtil.IN) != 0;
to
return (x & IsInUtil.OUT) == 0;

Means, calcContains() would return false if at least one point is not contained.

Gerd

________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Gerd 
Petermann <[email protected]>
Gesendet: Donnerstag, 1. April 2021 10:16
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4622: - use IsInUtil to do 
geometry calculations like insideness or outsideness: Allows to remove a lot of 
complex code but might be slower in some cases.

Hi Ticker,

to be more prezise: Looking at the code in runIntersectionCheck() it may change 
the Bitset unfinishedPolys. Up to now I did not find a case where this happens, 
so I am tempted to remove the code, but I'd feel better if I would understand 
why it was coded before removing it.

Gerd


________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Gerd 
Petermann <[email protected]>
Gesendet: Donnerstag, 1. April 2021 09:29
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4622: - use IsInUtil to do 
geometry calculations like insideness or outsideness: Allows to remove a lot of 
complex code but might be slower in some cases.

Hi Ticker,

yes, that's what I plan to do. Right now I try to understand what is done with 
the data in collection intersectingPolygons.

Gerd


________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Ticker 
Berkin <[email protected]>
Gesendet: Donnerstag, 1. April 2021 09:25
An: [email protected]; [email protected]
Betreff: Re: [mkgmap-dev] [mkgmap-svn] Commit r4622: - use IsInUtil to do 
geometry calculations like insideness or outsideness: Allows to remove a lot of 
complex code but might be slower in some cases.

Hi Gerd

Wouldn't it be more efficient to choose a point within a each polygon
and then use IsInUtils.isPointInShape and the relative areas to test if
this polygon is in others. The point could be the centre of the
polygon, after checking isPointInShape == IN on itself, and, if not,
make do with the closing point, or some trial and error moving from the
closing point.

This also bypasses ambiguities cause by overlapping polygons in this
phase of the logic.

Ticker

On Wed, 2021-03-31 at 15:56 +0100, svn commit wrote:
> Version mkgmap-r4622 was committed by gerd on Wed, 31 Mar 2021
> BRANCH: faster-mp
> - use IsInUtil to do geometry calculations like insideness or
> outsideness: Allows to remove a lot of complex code but might be
> slower in some cases.
> - document the poor completeness of collection intersectingPolygons.
> Probably will removed as well.
>
>
> http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4622
> _______________________________________________
> mkgmap-svn mailing list
> To unsubscribe send an mail to [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-svn
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to