logo separator

[mkgmap-dev] Gaps in surfaces

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Sep 29 10:19:11 BST 2023

Hi Ticker,

no problem, I think this is a very old error ;)
I think the remaining gaps (at res 24) are produced by the MultipolygonCutter. It sometimes cuts the outer and produces new points and these new points are not added to the inner rings, only to the outer.
I have to find out if this can be fixed by avoiding these cuts or by modifying the inner rings.

Gerd


________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Freitag, 29. September 2023 11:03
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Gaps in surfaces

Hi

I was thinking that gaps like this could often happen when adjacent polygons share the points
along the common boundary, but, during the various point-removal optimisations, esp. Douglas
Peucker, different points along this boundary are chosen to represent the 2 polygons.

Regarding LineClipperTest, I don't have the facilities to look at this until next week.

Ticker

On Fri, 2023-09-29 at 06:57 +0000, Gerd Petermann wrote:
> Hi all,
>
> I've found out that this problem is caused by a flaw in the "high precision" code. Under
> special conditions, two points with almost identical coordinates are internally represented
> with very different values. There is a possible overflow in the delta values, the value +32
> should not occur as it cannot be represented with 6 bits, but the calculations produce this
> value.
> I think I have an ugly fix for this but the resulting map still shows (smaller) gaps and a
> unit test needs corrections, so there is more to do.
> Attached is a patch that checks for this overflow. Work in progress and maybe causes trouble
> in other areas, e.g. in South America where we have negative lat/lon values.
>
> @Ticker: The unit test für LineClipperTest fails. I am not sure if only the test has to be
> changed (how) or if the code in LineClipper can be improved. I seem to remember that you
> suggested to use
> the code in ShapeSplitter instead.
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd Petermann
> <gpetermann_muenchen at hotmail.com>
> Gesendet: Dienstag, 26. September 2023 19:58
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Gaps in surfaces
>
> Hi Michael,
>
> okay, I can reproduce the problem. I assume it is caused by the code which subtracts the inner
> area from the multipolygon area.
> No idea if this can be fixed easily.
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Forstner Michael
> <forstner-m at a1.net>
> Gesendet: Dienstag, 26. September 2023 19:44
> An: 'Development list for mkgmap'
> Betreff: Re: [mkgmap-dev] Gaps in surfaces
>
> Hello Gerd,
>
> here is the area: https://www.openstreetmap.org/#map=19/48.57117/13.96920 I
> understand that it is necessary to make rounding. If a point of two surfaces
> is equal in OSM, the point should also be equal in Garmin.
>
> Thank you!
>
> Best regards,
> Michael
>
>
> _______________________________________________
> 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


More information about the mkgmap-dev mailing list