logo separator

[mkgmap-dev] Internal Error Failed to render Multipolygon

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Sat Sep 7 19:32:36 BST 2024

Hi Gerd

My version is the one before:
  <relation id='1754729' timestamp='2024-09-01T17:50:47Z' uid='20024786'
user='Cmapuk-noxa6bl4' visible='true' version='1231' changeset='156066008'>

I was thinking something similar, but, instead of changing niceSplitShift,
changing the fixed depth limit of 10, to be based on the size of the area, so
that it stops a couple splits before the split would fail. In this example I
found changing it to
   if (depth >= 9 || ...
it worked and took the same time as the failing value of 10.

Regards
Ticker

On Sat, 2024-09-07 at 04:33 +0000, Gerd Petermann wrote:
> Hi Ticker,
> 
> I cannot reproduce the "Failed to render ... " message.
> Maybe I am looking at a different version of the MP. Mine is v1232.
> I see
> INFO: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation  f:\osm\lake.osm:
> Processing multipolygon http://www.openstreetmap.org/relation/1754729
> WARN: uk.me.parabola.imgfmt.app.Area  f:\osm\lake.osm: Area.split 2852864
> 1400832 2854912 1402880 res 11 can't 2 1
> WARN: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation  f:\osm\lake.osm:
> Multipolygon http://www.openstreetmap.org/relation/1754729 [ele=4.84,
> name=Ладожское озеро, natural=water, type=multipolygon, water=lake] contains
> errors.
> WARN: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation  f:\osm\lake.osm:
> Polygon 4611686018427400531(4P)(28079958[166P]) carries role inner but is not
> inside any other polygon. Potentially it does not belong to this multipolygon.
> WARN: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation  f:\osm\lake.osm:
> Multipolygon http://www.openstreetmap.org/relation/1754729 [ele=4.84,
> name=Ладожское озеро, natural=water, type=multipolygon, water=lake] contains
> errors.
> WARN: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation  f:\osm\lake.osm:
> Polygon 4611686018427403162(4P)(259078070[118P]) carries role inner but is not
> inside any other polygon. Potentially it does not belong to this multipolygon.
> 
> These messages go away when I change line 1985 in  MultiPolygonRelation from
> final int niceSplitShift = 11;
> to
> final int niceSplitShift = 10;
> 
> I can't remember why the value 11 was used.
> Does that help?
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd
> Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Freitag, 6. September 2024 18:04
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Internal Error Failed to render Multipolygon
> 
> Hi all,
> 
> forget my previous post. The way https://www.osm.org/way/339720813 is OK.
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Gerd
> Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Freitag, 6. September 2024 18:02
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Internal Error Failed to render Multipolygon
> 
> Hi Ticker,
> 
> Maybe the JOSM test doesn't work correctly. I think e.g. this way
> https://www.osm.org/way/339720813
> looks wrong. It is an inner inside an inner area and AFAIR this is not
> allowed.
> 
> 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, 5. September 2024 12:01
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Internal Error Failed to render Multipolygon
> 
> Hi Gerd
> 
> I can make the Area.split and the other error go away by setting
> noPartitioning() true in MultiPolygonRelation.java. The total time goes up
> from
> 17 to 39 seconds.
> 
> I can't see any problem in the logic when Area.split is unable to divide the
> largest polygon in two.
> 
> The relation might be faulty with intersections of the various components and
> partitioning with ShapeSplitter can expose these problems. Does the JOSM
> verification detect this.
> 
> Otherwise this is beyond me.
> 
> Regards
> Ticker
> 
> On Tue, 2024-09-03 at 17:09 +0100, Ticker Berkin wrote:
> > > Hi Thomas
> > > 
> > > I've just loaded the relation 1754729 with JOSM.
> > > JOSM validation reports no errors, but mkgmap (direct, no splitting) gives
> > > errors:
> > > 
> > > WARN: uk.me.parabola.imgfmt.app.Area  lakeLadoga.osm:
> > >  Area.split 2852864 1400832 2854912 1402880 res 11 can't 2 1
> > > 
> > > WARN: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation 
> > > lakeLadoga.osm:
> > >  Multipolygon http://www.openstreetmap.org/relation/1754729 [ele=4.84,
> > > int_name=Ladoga lake, name:en=Lake Ladoga, name=Ладожское озеро,
> > > natural=water,
> > > type=multipolygon, water=lake] contains errors.
> > > 
> > > WARN: uk.me.parabola.mkgmap.reader.osm.MultiPolygonRelation 
> > > lakeLadoga.osm:
> > >  Polygon 4611686018427403156(4P)(259078070[118P]) carries role inner but
> > > is
> > > not
> > > inside any other polygon. Potentially it does not belong to this
> > > multipolygon
> > > 
> > > The area.split WARN happens when there are too many object
> > > (points/lines/polygons) in 1 resolution unit.
> > > 
> > > The other error is as described.
> > > 
> > > I notice that this relation was edited a couple of days ago so maybe
> > > someone
> > > is
> > > fixing or creating problems.
> > > 
> > > I'll try again in a few days and investigate more deeply.
> > > 
> > > Regards
> > > Ticker
> > > 
> > > On Mon, 2024-09-02 at 19:44 +0200, Thomas Morgenstern wrote:
> > > > >  Hi Ticker, I found : osmium-tool and splitter works proper. I can the
> > > > > splitted <12345678>.osm.pbf open and render in JOSM. JOSM shows the
> > > > > part
> > > > > of
> > > > > the multipolygon 1754729, which is inside the boundary of the
> > > > > polygonfile
> > > > > for
> > > > > splitter. I assume, mkgmap has the problem. But sorry, I am not a good
> > > > > programmer and can not do deeper investigation or find a solution. If
> > > > > you
> > > > > interested, I can give you my polygon and the <maptile-
> > > > > number>.osm.pbf.
> > > > > 
> > > > >  Thomas
> > > > > 
> > > > > 
> > > > > Am 02.09.2024 um 15:04 schrieb Ticker Berkin:
> > > > > 
> > > > > 
> > > > > > > 
> > > > > > > Hi Thomas
> > > > > > > 
> > > > > > > I get similar problems just using
> > > > > > > 
> > > > > > >  https://download.geofabrik.de/europe/britain-and-ireland.html
> > > > > > > 
> > > > > > > directly. The relations that cause the problem are not within the
> > > > > > > above
> > > > > > > combined
> > > > > > > territories but excluding them would required a much more
> > > > > > > complicated
> > > > > > > shape
> > > > > > > to
> > > > > > > define the download area.
> > > > > > > 
> > > > > > > Ticker
> > > > > > > 
> > > > > > > On Mon, 2024-09-02 at 12:42 +0200, Thomas Morgenstern wrote:
> > > > > > > 
> > > > > > > > > 
> > > > > > > > >  Hi Ticker, i made further investigation. You are right.: the
> > > > > > > > > MultiPolygonRelation 1754729 ('Ladoga sea') was cut by ectract
> > > > > > > > > Scandinavia
> > > > > > > > > from europe-latest.osm.pbf using osmium-tool .
> > > > > > > > >  I am not sure, but means this, that osmium can not write a
> > > > > > > > > proper
> > > > > > > > > ectract,
> > > > > > > > > if such Relation must bee split ?
> > > > > > > > >  This means also, osmium has a bug ? I must check my osmium
> > > > > > > > > version...
> > > > > > > > >  regards Thomas
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Am 02.09.2024 um 10:30 schrieb Ticker Berkin:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > Hi Thomas
> > > > > > > > > > > 
> > > > > > > > > > > It isn't related to AngleChecker.
> > > > > > > > > > > 
> > > > > > > > > > > I notice that both these relations have been changed in
> > > > > > > > > > > the
> > > > > > > > > > > last
> > > > > > > > > > > couple
> > > > > > > > > > > of
> > > > > > > > > > > days
> > > > > > > > > > > so maybe they were faulty.
> > > > > > > > > > > 
> > > > > > > > > > > The large one is on the boarder with Scandinavia and it is
> > > > > > > > > > > likely that
> > > > > > > > > > > the
> > > > > > > > > > > map
> > > > > > > > > > > extraction download only had part of it and this gives
> > > > > > > > > > > rise
> > > > > > > > > > > to this
> > > > > > > > > > > type
> > > > > > > > > > > of
> > > > > > > > > > > error.
> > > > > > > > > > > 
> > > > > > > > > > > Regards
> > > > > > > > > > > Ticker
> > > > > > > > > > > 
> > > > > > > > > > > On Mon, 2024-09-02 at 09:43 +0200, Thomas Morgenstern
> > > > > > > > > > > wrote:
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > > > 
> > > > > > > > > > > > > 
> > > > > > > > > > > > >  Hello , I use mkgmap-4921 with patch from Ticker
> > > > > > > > > > > > > Berkin
> > > > > > > > > > > > > -
> > > > > > > > > > > > > Angelchecker-V6.
> > > > > > > > > > > > > With that i get in Scandinavia following error :
> > > > > > > > > > > > > Internal Error
> > > > > > > > > > > > > Failed
> > > > > > > > > > > > > to
> > > > > > > > > > > > > render MultiPolygonRelation 1754729 and 304507. Rel.
> > > > > > > > > > > > > 1754729 is
> > > > > > > > > > > > > 'Ladoga'-
> > > > > > > > > > > > > sea
> > > > > > > > > > > > > with 5 226 Elements. Rel.  304507 is
> > > > > > > > > > > > > Multipolygon=water,
> > > > > > > > > > > > > 171
> > > > > > > > > > > > > Elements.
> > > > > > > > > > > > >  I assume the error ist not specific to the
> > > > > > > > > > > > > patch...and
> > > > > > > > > > > > > more
> > > > > > > > > > > > > common..
> > > > > > > > > > > > >  How to avoid this ?
> > > > > > > > > > > > > 
> > > > > > > > > > > > >  regards Thomas
> > > > > > > > > > > > > 
> > > > > > > > > > > > > _______________________________________________
> > > > > > > > > > > > > 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
> _______________________________________________
> 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