[Patch v1] distinguish equal and identical points

Hi, attached is a patch that should fix the remaining possible problems regarding the reported Way.isClosed() and Coord.equals() problems. It seems that the use of IdentityHashMap is a bit slower than HashMap, so throughput is a few percent slower. Open question: What is the expected result of the style function is_closed() ? @WanMil: Please test if it creates proper precompiled boundaries and sea data. @Marko: Please check if the "converting anti-island" messages are gone now. Gerd closed-equal-v1.patch <http://gis.19327.n5.nabble.com/file/n5790123/closed-equal-v1.patch> -- View this message in context: http://gis.19327.n5.nabble.com/Patch-v1-distinguish-equal-and-identical-poin... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On Tue, Dec 17, 2013 at 12:18:23PM -0800, GerdP wrote:
@Marko: Please check if the "converting anti-island" messages are gone now.
There are 20 of them for Finland after applying my filter. There could also be valid warnings, because I have been ignoring these errors and not adding them to my filter either. I checked one example: 2013/12/18 16:28:01 WARNING (SeaGenerator): 63240002.osm.pbf: Converting anti-island starting at http://www.openstreetmap.org/?mlat=60.20405&mlon=25.49942&zoom=17 into an island as it is surrounded by water It looks like this is referring to the 1.5m wide islet or rock http://www.openstreetmap.org/way/242824968 which is a closed polygon, with land on the left. I think that the proper action would be to shrink this to a single point and then discard it, because it would be a polygon with zero area. Best regards, Marko

Hi Marko, thanks for the feedback. Did you use r2888 or later together with the patch? I think the warning is produced long before it comes to the point where mkgmap decides if the polygon is big enough. I am not very familiar with the SeaGenerator algo, but I think this message is produced when incomplete data is processed and mkgmap once decided that way 242824968 encloses sea and later detects that it must be an island. A bigger problem would be the other case (island changed to sea) Gerd
Date: Wed, 18 Dec 2013 17:17:46 +0200 From: marko.makela@iki.fi To: mkgmap-dev@lists.mkgmap.org.uk Subject: [mkgmap-dev] Bogus anti-island warnings for tiny natural=coastline polygons
On Tue, Dec 17, 2013 at 12:18:23PM -0800, GerdP wrote:
@Marko: Please check if the "converting anti-island" messages are gone now.
There are 20 of them for Finland after applying my filter. There could also be valid warnings, because I have been ignoring these errors and not adding them to my filter either.
I checked one example:
2013/12/18 16:28:01 WARNING (SeaGenerator): 63240002.osm.pbf: Converting anti-island starting at http://www.openstreetmap.org/?mlat=60.20405&mlon=25.49942&zoom=17 into an island as it is surrounded by water
It looks like this is referring to the 1.5m wide islet or rock
http://www.openstreetmap.org/way/242824968
which is a closed polygon, with land on the left. I think that the proper action would be to shrink this to a single point and then discard it, because it would be a polygon with zero area.
Best regards,
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Wed, Dec 18, 2013 at 04:36:09PM +0100, Gerd Petermann wrote:
thanks for the feedback. Did you use r2888 or later together with the patch?
Yes, I updated to trunk -r2894 right before applying the patch. No other patches were applied.
I am not very familiar with the SeaGenerator algo, but I think this message is produced when incomplete data is processed and mkgmap once decided that way 242824968 encloses sea and later detects that it must be an island.
Could be. In any case, it would be nice to get rid of these bogus warnings, so that the real coastline errors can be fixed. Yes, the errors could be checked with the JOSM Validator, which implements some checks. AFAIU, the neither the JOSM nor mkgmap checks are subsets of each other (you need to run both to get all checks). Marko
participants (3)
-
Gerd Petermann
-
GerdP
-
Marko Mäkelä