Anti-island check confused; defined a monster multipolygon

Mark, WanMil, It seems that the anti-island check got the piecewise defined coast line of Inarinjärvi (Lake Inari) wrong. I now defined a multipolygon for the lake and its about 700 islands, hopefully making no mistake in the process: http://www.openstreetmap.org/browse/relation/402543 Some islands contain lakes, and according to the wiki should include those in the relation as well. Here is an example: http://www.openstreetmap.org/browse/way/31257120 http://www.openstreetmap.org/?mlat=68.8415&mlon=27.5145&zoom=13 The coastline of Lake Inari is to the west of that lake. I will have to check if these lakes look fine, and also that these lakes or patches of water will not inherit the name from the relation. I will add the lakes on that island to the multipolygon, as a test case. JOSM is getting slow at this. Does anyone know a JOSM trick that would allow me to select exactly everything that is bounded by the current selection? There is natural=water near the coastline, on the mainland, and I do not want to add those as role=outer. Marko

Hello Marko,
It seems that the anti-island check got the piecewise defined coast line of Inarinjärvi (Lake Inari) wrong. I now defined a multipolygon for the lake and its about 700 islands, hopefully making no mistake in the process: http://www.openstreetmap.org/browse/relation/402543
When you say "wrong", what exactly do you mean? Mark

Hello Mark,
It seems that the anti-island check got the piecewise defined coast line of Inarinjärvi (Lake Inari) wrong. I now defined a multipolygon for the lake and its about 700 islands, hopefully making no mistake in the process: http://www.openstreetmap.org/browse/relation/402543
When you say "wrong", what exactly do you mean?
I mean these messages from --generate-sea=multipolygon,no-sea-sectors: 2010/02/06 12:16:26 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=68.79379&mlon=27.95413&zoom=17 into an island as it is surrounded by water 2010/02/06 12:16:26 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=69.41525&mlon=28.71751&zoom=17 into an island as it is surrounded by water 2010/02/06 12:16:26 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=66.56882&mlon=27.78983&zoom=17 into an island as it is surrounded by water Today, I started from the first one and defined the Inarinjärvi multipolygon. A couple of days ago, I checked all anti-island warnings and fixed the genuine ones. These three cases look like a lake mistaken for an anti-island. I do not blame mkgmap; I think that the right thing is to define multipolygons for all lakes. Marko

Hello Marko,
It seems that the anti-island check got the piecewise defined coast line of Inarinjärvi (Lake Inari) wrong. I now defined a multipolygon for the lake and its about 700 islands, hopefully making no mistake in the process: http://www.openstreetmap.org/browse/relation/402543
When you say "wrong", what exactly do you mean?
I mean these messages from --generate-sea=multipolygon,no-sea-sectors:
2010/02/06 12:16:26 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=68.79379&mlon=27.95413&zoom=17 into an island as it is surrounded by water 2010/02/06 12:16:26 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=69.41525&mlon=28.71751&zoom=17 into an island as it is surrounded by water 2010/02/06 12:16:26 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=66.56882&mlon=27.78983&zoom=17 into an island as it is surrounded by water
Today, I started from the first one and defined the Inarinjärvi multipolygon. A couple of days ago, I checked all anti-island warnings and fixed the genuine ones. These three cases look like a lake mistaken for an anti-island.
I do not blame mkgmap; I think that the right thing is to define multipolygons for all lakes.
Hmm, I wonder if the test to see if an anti-island is contained within an island is failing if the anti-island reaches a tile edge. If you still have the same data, could you try modifying containsPointsOf() in Way.java so that it looks like this: public boolean containsPointsOf(Way other) { Polygon thisPoly = new Polygon(); for(Coord p : points) thisPoly.addPoint(p.getLongitude(), p.getLatitude()); for(Coord p : other.points) if(thisPoly.contains(p.getLongitude(), p.getLatitude())) return true; return false; } i.e. make it return true if any point is inside rather than all points are inside. Mark

Hi Mark,
Hmm, I wonder if the test to see if an anti-island is contained within an island is failing if the anti-island reaches a tile edge.
That is a possibility. It would not be the splitter tile edge, but the edge of the Geofabrik extract. The mapped coastline of lake Inari intersects with the Finnish-Russian border (something that I was not aware of), and the border polygons of Geofabrik can easily be a few km off.
If you still have the same data, could you try modifying containsPointsOf() in Way.java so that it looks like this:
public boolean containsPointsOf(Way other) { Polygon thisPoly = new Polygon(); for(Coord p : points) thisPoly.addPoint(p.getLongitude(), p.getLatitude()); for(Coord p : other.points) if(thisPoly.contains(p.getLongitude(), p.getLatitude())) return true; return false; }
i.e. make it return true if any point is inside rather than all points are inside.
Done. I get the very same warnings: 2010/02/06 18:37:01 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=68.79379&mlon=27.95413&zoom=17 into an island as it is surrounded by water 2010/02/06 18:37:01 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=69.41525&mlon=28.71751&zoom=17 into an island as it is surrounded by water 2010/02/06 18:37:02 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=66.56882&mlon=27.78983&zoom=17 into an island as it is surrounded by water Best regards, Marko

Marko,
Hmm, I wonder if the test to see if an anti-island is contained within an island is failing if the anti-island reaches a tile edge.
That is a possibility. It would not be the splitter tile edge, but the edge of the Geofabrik extract. The mapped coastline of lake Inari intersects with the Finnish-Russian border (something that I was not aware of), and the border polygons of Geofabrik can easily be a few km off.
OK.
If you still have the same data, could you try modifying containsPointsOf() in Way.java so that it looks like this:
...
Done. I get the very same warnings:
2010/02/06 18:37:01 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=68.79379&mlon=27.95413&zoom=17 into an island as it is surrounded by water 2010/02/06 18:37:01 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=69.41525&mlon=28.71751&zoom=17 into an island as it is surrounded by water 2010/02/06 18:37:02 WARNING (Osm5XmlHandler): 63240003.osm.gz: Converting anti-island starting at http://www.openstreetmap.org/?mlat=66.56882&mlon=27.78983&zoom=17 into an island as it is surrounded by water
Hmm, I obviously don't understand what's going here. The problem is, I can't picture what the layout of your tile is and how that lake boundary looks. Can you put the osm data for that tile (compressed, of course) somewhere so I can grab it? Mark
participants (2)
-
Mark Burton
-
Marko Mäkelä