[mkgmap-dev] Squaring off of land outlines
From Ticker Berkin ticker at jagIT.co.uk on Wed Jan 29 11:09:39 GMT 2020
Hi I have always used the default for this, including the skipSizeFilter bit for sea as in the default style and had never noticed a problem. I'm now about to experiment with --min-size-polygon=4. The value of this option is in Garmin map units, regardless of the resolution of the sub-map. Assuming it is worthwhile, wouldn't it be better of the value was taken as 'current-resolution-units'? I assume that, at low resolutions, polygons that degenerate into a single point or line are chucked anyway, so a value of <= 8 is irrelevant for resolution <= 18 Ticker On Wed, 2020-01-29 at 10:50 +0000, Gerd Petermann wrote: > Hi Mike, > > thanks for the reminder. It seems that I somehow missed v7 of the > patch. > Let's postpone the changes regarding the size filter. I first like to > get more feedback. > Will test v7 now... > > Gerd > > ________________________________________ > Von: Mike Baggaley <mike at tvage.co.uk> > Gesendet: Mittwoch, 29. Januar 2020 11:43 > An: 'Gerd Petermann'; 'Felix Hartmann'; 'Development list for mkgmap' > Betreff: RE: [mkgmap-dev] Squaring off of land outlines > > Hi Gerd, setting the default to 0 sounds sensible. The documentation > of > --min-size-polygon doesn't mention you can set it to 0 to turn it off > (it is > mentioned in --polygon-size-limits, but this seems to me to be the > wrong > place). The recommendation of 8-15 gives no indication of what these > values > actually mean or whether 15 means remove more or less than 1. > > Are you expecting anything further from me on the documentation patch > I > supplied earlier? I could include an update to this section: changing > the > default, moving the meaning of 0 from --polygon-size-limits to > --min-size-polygon, including a mention of mkgmap:skipSizeFilter=true > to > override it for specific polygon types and giving more information on > what > the values mean (for the last one I would need some info). > > Cheers, > Mike > > -----Original Message----- > From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com] > Sent: 29 January 2020 09:51 > To: Mike Baggaley <mike at tvage.co.uk>; 'Felix Hartmann' > <extremecarver at gmail.com>; 'Development list for mkgmap' > <mkgmap-dev at lists.mkgmap.org.uk> > Subject: Re: [mkgmap-dev] Squaring off of land outlines > > Hi Mike, > > the size filter "looks" at the polygons which are to be added to the > map. > Those polygons are the result of a long chain of split and merge > processes > followed by rounding which - sometimes - produce rather small shapes. > The > sea multipolygon is split into parts of no more than 255 points. So, > the > more detailed the mapping of the coastline the smaller those parts. > This process is not optimal, see also the todo list (1). > I've done a few tests with the default option (--min-size-polygon=8) > and > default style with the options given in examples/sample.cfg and I > think most > of the dropped elements at low resolutions should have been kept. For > small > map tiles like yours even the background (0x4b) polygon is dropped. > The effect of the filter reg. img size is rather small thus it also > has > nearly no effect on throughput times. > > My suggestion would be to change the default to 0 for the --min-size > -polygon > option. Suggested reasonable values should be in the range of 0-8 and > maybe > print a warning if --min-size-polygon is used with a value > 8. > > Gerd > (1) http://www.mkgmap.org.uk/dev/todo > > ________________________________________ > Von: Mike Baggaley <mike at tvage.co.uk> > Gesendet: Mittwoch, 29. Januar 2020 10:22 > An: 'Gerd Petermann'; 'Felix Hartmann'; 'Development list for mkgmap' > Betreff: RE: [mkgmap-dev] Squaring off of land outlines > > In the case where this is causing squaring off of the sea polygon, > the > coastline is not usually small even at the low resolution. So why is > the > size filter discarding it? Is it because the object is crossing a > tile > boundary and the part within a tile is small? If that is the case, it > would > make sense to not discard any object that is touching the tile > boundary. > > Regards, > Mike > > -----Original Message----- > From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com] > Sent: 29 January 2020 01:20 > To: Felix Hartmann <extremecarver at gmail.com>; Development list for > mkgmap > <mkgmap-dev at lists.mkgmap.org.uk> > Subject: Re: [mkgmap-dev] Squaring off of land outlines > > Hi all, > > the default style adds buildings only with resolution 24. The size > filter is > disabled at this resolution. The area_size() style function allows to > filter > small polygons at this resolution. > The size filter compares the width or height of the bounding box of > the > object AFTER all points where rounded to the given resolution. > The rounding can produce a bbox which is smaller than the original > object > and thus produce the gaps in sea. I am pretty sure that you will also > see > those gaps with huge natural=wood or natural=water multipolygons if > they are > mapped in great detail when the size filter is used with default > value > (--min-size-polygon=8) > I think this default is too high and the documentation even suggests > to use > a higher value. > > Gerd > > ________________________________________ > Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag > von > Felix Hartmann <extremecarver at gmail.com> > Gesendet: Dienstag, 28. Januar 2020 23:52 > An: Development list for mkgmap > Betreff: Re: [mkgmap-dev] Squaring off of land outlines > > Performance of map on device is drastically improved you you kick out > those > tiny polygons. Especially in cities where people have detail mapped > all > buildings. If you don't have building=yes or building=* in your style > - then > you can likely live with the filter disabled (not sure how much > bigger the > map data gets). > > On Tue, 28 Jan 2020 at 21:41, Gerd Petermann > <gpetermann_muenchen at hotmail.com<mailto: > gpetermann_muenchen at hotmail.com>> > wrote: > Hi Mike, > > "sea" is build from shapes (= polygons). > The size filter is not explained in the style manual, but in the > options > --min-size-polygon and --polygon-size-limits. > Unfortunately the filter works a bit unpredictable at low > resolutions, so in > my eyes it is a good idea to disable. > I've never fully understood the purpose of this filter. I think it > should > improve performance, but it seems to decrease quality even more. > > You may play with --min-size-polygon=0 to see what happens when the > filter > is disabled. > > Gerd > > ________________________________________ > Von: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Gesendet: Dienstag, 28. Januar 2020 21:21 > An: 'Gerd Petermann'; 'Development list for mkgmap' > Betreff: RE: [mkgmap-dev] Squaring off of land outlines > > Brilliant! A big improvement! It still doesn't exactly match the land > polygon, but that doesn't matter for my purposes. I suggest changing > the to > do list so it says use the same algorithm for shapes, lines and sea. > I also > suggest adding a sentence to the style manual in the explanation of > mkgmap:skipSizeFilter - the description doesn't explain the purpose > or what > the effect is of passing the size filter. > > Thanks for your assistance, > Mike > > -----Original Message----- > From: Gerd Petermann > [mailto:gpetermann_muenchen at hotmail.com<mailto: > gpetermann_muenchen at hotmail.c > om>] > Sent: 28 January 2020 19:03 > To: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Subject: AW: [mkgmap-dev] Squaring off of land outlines > > Hi Mike, > > some small rather small sea polygons are filter by the size filter. > Change the statememnt for sea polygons to this: > natural=sea {add mkgmap:skipSizeFilter=true; name '${name}'} [0x32 > resolution 14] > > See also the corresponding rule in the default style: > natural=sea {add mkgmap:skipSizeFilter=true; set mkgmap:drawLevel=2} > [0x32 > resolution 10] > > Gerd > > ________________________________________ > Von: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Gesendet: Dienstag, 28. Januar 2020 19:39 > An: 'Gerd Petermann' > Betreff: RE: [mkgmap-dev] Squaring off of land outlines > > Thanks Gerd. I has been considering trying to find the problem > myself, but > I'm not familiar with the writing sections of code, and they are > complicated > to get to grips with. > > Cheers, > Mike > > -----Original Message----- > From: Gerd Petermann > [mailto:gpetermann_muenchen at hotmail.com<mailto: > gpetermann_muenchen at hotmail.c > om>] > Sent: 28 January 2020 16:16 > To: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>>; > 'Development > list for mkgmap' > <mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk > >> > Subject: AW: [mkgmap-dev] Squaring off of land outlines > > Hi Mike, > > okay, I'll have a closer look now. > > Gerd > > ________________________________________ > Von: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Gesendet: Dienstag, 28. Januar 2020 16:51 > An: 'Gerd Petermann'; 'Development list for mkgmap' > Betreff: RE: [mkgmap-dev] Squaring off of land outlines > > Hi Gerd, the problem I have is not the one in the to do list. If I > add the > polygon fill for natural=coastline, this does produce a different > outline > than the one for the line, but both are reasonable approximations and > neither contains unexpected artefacts. The sea generation > approximation is > wildly different and contains unwanted artefacts. Please see the > attached > image that contains land in brown, sea in blue and an area of white > that is > not filled by either. I believe this is a bug in the sea generation > code. I > would expect sea generation to use the same algorithm as for filled > areas so > that holes are not left. I'm not too worried about the line being > slightly > different. > > Regards, > Mike > > -----Original Message----- > From: Gerd Petermann > [mailto:gpetermann_muenchen at hotmail.com<mailto: > gpetermann_muenchen at hotmail.c > om>] > Sent: 28 January 2020 14:59 > To: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>>; > 'Development > list for mkgmap' > <mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk > >> > Subject: AW: [mkgmap-dev] Squaring off of land outlines > > Hi Mike, > > See last point in the todo list: http://www.mkgmap.org.uk/dev/todo > I think what you see is exactly the result of the two different > algos. > I can only suggest to omit the rendering of polygon outlines at > resolutions > below 24. > > ________________________________________ > Von: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Gesendet: Dienstag, 28. Januar 2020 15:23 > An: 'Gerd Petermann'; 'Development list for mkgmap' > Betreff: RE: [mkgmap-dev] Squaring off of land outlines > > Hi Gerd, I have produced a small sample which demonstrates the > problem. It > contains one very small island. I have cut down the style to a bare > minimum > with just two resolutions: 24 and 14 containing just sea and a > coastline > outline. At resolution 24 the sea and coastline are coincident. At > 14, they > are wildly different. The coastline at low resolution includes a spur > which > is a complication. The ideal sea boundary would be the same as the > coastline, but with the spur removed (or perhaps the spur should not > be on > the coastline either). I have included the style, typ file, command > line in > a batch file and osm data in the attached zip. Please let me know if > you > need anything else. > > Cheers, > Mike > > -----Original Message----- > From: Gerd Petermann > [mailto:gpetermann_muenchen at hotmail.com<mailto: > gpetermann_muenchen at hotmail.c > om>] > Sent: 28 January 2020 08:26 > To: Mike Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>>; > 'Development > list for mkgmap' > <mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk > >> > Subject: AW: [mkgmap-dev] Squaring off of land outlines > > Hi Mike, > > I can try to find out what's wrong but I would need a lot more > details about > your map creation process. Could be an error in mkgmap or in the OSM > data or > in the --levels option or in the --min-size-polygon option or > --polygon-size-limits or ... > > Gerd > > ________________________________________ > Von: mkgmap-dev > <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto: > mkgmap-dev-bounces at lists.mkgm > ap.org.uk>> im Auftrag von Mike > Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Gesendet: Montag, 27. Januar 2020 19:07 > An: 'Development list for mkgmap' > Betreff: Re: [mkgmap-dev] Squaring off of land outlines > > HI Gerd, I don't have an old map, but this has been happening for > some time > - I am not sure whether it has always done this, but thought it would > be > worth trying a few old versions to see whether it is bug that got > introduced, or is one that has always been there. It looks similar to > the > problem reported on Feb 18 2017 with "Terraced/pixellated coastline > with > --precomp-sea" as the title. I am not using --precomp-sea, but the > problem I > am getting is also in the sea outline. NopMap indicated that his > problem was > fixed in r3819, however, I have downloaded the source to that version > and > compiled it, and it exhibits the same problem for me. > > Regards, > Mike > > -----Original Message----- > From: Gerd Petermann > [mailto:gpetermann_muenchen at hotmail.com<mailto: > gpetermann_muenchen at hotmail.c > om>] > Sent: 27 January 2020 08:36 > To: 'Development list for mkgmap' > <mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk > >> > Subject: Re: [mkgmap-dev] Squaring off of land outlines > > Hi Mike, > > I am not aware of a folder that keeps all older releases or an error > that > would be related to this. > Are you sure that you didn't change mgkmap options like --levels or > the > style or the typ file? > Do you still have a map which looks better? In that case you should > find the > string mkgmap in the img file, e.g. "mkgmap-r4431" > > Gerd > > > ________________________________________ > Von: mkgmap-dev > <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto: > mkgmap-dev-bounces at lists.mkgm > ap.org.uk>> im Auftrag von Mike > Baggaley <mike at tvage.co.uk<mailto:mike at tvage.co.uk>> > Gesendet: Montag, 27. Januar 2020 01:43 > An: 'Development list for mkgmap' > Betreff: [mkgmap-dev] Squaring off of land outlines > > Hello, > > I am getting squaring off of the outline between land and sea at low > zoom > levels (less than 16) - see attached BaseCamp images of Gran Canaria > at > resolution 16 and at resolution 14 displayed at the same size. > Obviously > some reduction in accuracy is expected at lower zoom level, but not > these > artefacts. I'm not sure when this started happening but believe it > was some > time ago. I can't seem to find the old releases to try previous > versions, > http://svn.mkgmap.org.uk/mkgmap/releases/ just shows me an empty > folder. Can > you point me to the correct download folder that contains the > previous jar > files, and/or let me know if this is a known problem, and if so > whether > there is a workaround? > > Thanks, > Mike > > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > -- > Felix Hartman - Openmtbmap.org & VeloMap.org > Schusterbergweg 32/8 > 6020 Innsbruck > Austria - Österreich > > > > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
- Previous message: [mkgmap-dev] Squaring off of land outlines
- Next message: [mkgmap-dev] Squaring off of land outlines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list