logo separator

[mkgmap-dev] generate-sea option and faster-mp changes

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri May 13 15:48:18 BST 2022

Hi Ticker,

the SeaGenerator uses Planet as outer ring. The partitioning simply cuts in the middle of the tile.
So, it produced multiple areas without any inner and those where added to the output without
further trimming to the tile boundaries.
Maybe your improvements could also be used for this code?

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, 13. Mai 2022 16:42
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] generate-sea option and faster-mp changes

Hi Gerd

Great stuff. I can understand how errors could lead to exact 0/90/180
but not 45!

Thanks for tidying and applying SeaGenerator patch. I now notice that
CreateSeaWay(enlarge = true) is never called as a result of my
restructure and this bit of logic could be deleted.

Ticker

On Fri, 2022-05-13 at 08:09 +0000, Gerd Petermann wrote:
> Hi Ticker,
>
> ouch, the test with precompiled-sea failed. I found artifacts in some
> generated tiles, but they are not caused or fixed by your patch or
> mine.
> E.g. sea_2490368_-7766016.osm.pbf contains some nodes like
>         <node id="11858" lat="0.0" lon="-180.0"/>
>         <node id="11859" lat="-90.0" lon="-180.0"/>
>         <node id="11860" lat="-90.0" lon="-90.0"/>
>         <node id="11861" lat="0.0" lon="-90.0"/>
>         <node id="11862" lat="45.0" lon="-180.0"/>
> with a land-polygons-split-4326.zip from 2021.
> Again they disappear when I switch off the partitioning in
> MultiPolygonRelation.
>
> I'll download current data and try to reprpduce it...
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Gerd Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Freitag, 13. Mai 2022 09:20
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] generate-sea option and faster-mp changes
>
> Hi Ticker,
>
> attached is my patch to fix the special case when partitioning cuts a
> multipolygon so that only two equal rectangles are left.
>
> This also fixes the problem for me, but I guess it might fail in edge
> cases where the cutting goes through a point where
> inner and outer diverge.
>
> Reg. your patch: Looks good, I would just rename NATURAL_TAG_KEY to
> TK_NATURAL so that it matches the naming in other sources.
>
> I am running some tests reg. precompiled sea at the moment...
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Gerd Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Donnerstag, 12. Mai 2022 14:55
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] generate-sea option and faster-mp changes
>
> Hi Ticker,
>
> I can reproduce the error with the old code and that error disappears
> when I disable the partitioning in class MultiPolygonRelation.
> I've not yet understood why, but I fear your patch simply works
> around this problem.
> The partitioning seems to produce parts where an inner and an outer
> rectangle both seem to cover the same area.
> I think I have to fix that as well.
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
> Gesendet: Donnerstag, 12. Mai 2022 14:29
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] generate-sea option and faster-mp changes
>
> Hi Gerd
>
> Looking at older versions (2019), createLandWay() makes a polygon
> with
> the tile bounds; no extra. This hasn't changed since then.
>
> createSeaWay() has flag to enlarge the polygon slightly and use of
> this
> hasn't changed in the release version
>
> Ticker
>
> On Thu, 2022-05-12 at 08:37 +0000, Gerd Petermann wrote:
> > Hi Ticker,
> >
> > thanks, I'll take a look at it. My understanding was that
> > SeaGenerator should produce an outer way which is slightly larger
> > than the tile.
> > Did I change that?
> >
> > Gerd
> >
> > ________________________________________
> > Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> > von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
> > Gesendet: Donnerstag, 12. Mai 2022 08:20
> > An: mkgmap development
> > Betreff: [mkgmap-dev] generate-sea option and faster-mp changes
> >
> > Hi Gerd
> >
> > I've just rebuilt britain-and-ireland-latest.osm.pbf with the
> > current
> > trunk and find that many tiles on the coast have flooded
> > rectangles.
> > The coastline is all correct and these flooded area are normally
> > well
> > inland and unrelated to where the coastline crosses the tile
> > boundary.
> >
> > I use option
> >   --generate-sea="multipolygon,extend-sea-sectors,close-gaps=750"
> > and this worked fine up to about a year ago - I've only just
> > noticed
> > the problem.
> >
> > Cutting this from a suitable area (Wales, UK, Britain, Europe etc)
> >
> > 74220030: 2408448,-331776 to 2430976,-196608
> > #       : 51.679688,-7.119141 to 52.163086,-4.218750
> >
> > and building with minimal options plus above and default style
> > should
> > demonstrate the problem. There are also extra error messages
> > starting
> >
> > ... 030.osm.pbf: Multipolygon generated SeaPolygonRelation [nat...
> >
> > in the log file, which I attach
> >
> > I think it is related to the faster-mp changes and the MP structure
> > SeaGenerator created. This has 1 outer (the tile) and all bits of
> > land
> > are inners, including land touching the edge of the tile.
> >
> > I've attached a patch for an enhanced version of SeaGenerator that
> > distinguishes between land/sea areas that touch the edge and true
> > [anti-]islands and only use MP processing for the islands. With
> > this,
> > tiles are correct.
> >
> > It also has other benefits: It is clearer in what is happening,
> > doesn't
> > do a lot of pointless tagging of ways that will joined to become
> > polygons, etc
> >
> > Ticker
> >
> > _______________________________________________
> > 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

_______________________________________________
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