missing coastline polygon lately

A previously working build now have no sea polygon. here's is may args list: code-page=1252 ea tdbfile latin1 country-abbr=PHI country-name=PHILIPPINES remove-short-arcs=5 route road-name-pois add-pois-to-areas family-id=639 family-name=OSM_PHIL overview-mapname=40000001 series-name=OSM_PHIL description=OSM_PHIL style-file=~/styles/osm-ph generate-sea=polygons index adjust-turn-headings check-roundabout drive-on-right check-roundabout-flares report-dead-ends ignore-maxspeeds In the polygon styles, I have: natural=land [0x27 resolution 10] Checking the logs there are only two errors related to the coastline: 2010/09/08 09:59:25 WARNING (Osm5XmlHandler): philippines.osm: Non-closed coastline segment does not hit bounding box: 892720649 (11.48494/124.39909) 312537247 (10.99141/124.62028) http://www.openstreetmap.org/?mlat=11.48494&mlon=124.39909&zoom=17 2010/09/08 09:59:25 WARNING (Osm5XmlHandler): philippines.osm: Non-closed coastline segment does not hit bounding box: 312537255 (10.98998/124.62054) 892720555 (11.48520/124.39952) http://www.openstreetmap.org/?mlat=10.98998&mlon=124.62054&zoom=17 The coastlines are fixed now and I'm waiting for the latest geofabrik extract. But this is a very interesting case because, previous builds have sea polygons even when there are coastline errors. I'm using mkgmap svn 1649 -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Wed, Sep 08, 2010 at 10:27:46AM +0800, maning sambale wrote:
But this is a very interesting case because, previous builds have sea polygons even when there are coastline errors. I'm using mkgmap svn 1649
Educated guess: previous errors canceled out each other (the errors must have been visible in a smaller area). Unless your map extract is a perfect island, you may have to move the coastline endpoints to make mkgmap happy. When I successfully enabled coastline generation for Finland, I both adjusted the Geofabrik cutting polygon (it took a few iterations with Frederik Ramm) and moved the endpoints of the mainland coastline to the tile boundaries (so that the last bit of coastline is a straight N-S or W-E line). I played with the idea of merging real coastline of neighbour countries to the map, but that did not work out, and it would have been less obvious to see where the mapped territory ends. Moving the coastline endpoints can be done with a trivial Perl or sed script. See my osm2img.sh at http://www.polkupyoraily.net/osm/ for an example. To find the endpoints of your map extract, you can extract the natural=coastline ways from your map extract and load that to JOSM. Marko

Dear Marko, Thanks for the reply.
Educated guess: previous errors canceled out each other (the errors must have been visible in a smaller area).
Unless your map extract is a perfect island, you may have to move the coastline endpoints to make mkgmap happy. I think it is, the Philippines is an island/archipelagic country:
coastline generation for Finland, I both adjusted the Geofabrik cutting polygon (it took a few iterations with Frederik Ramm) and moved the endpoints of the mainland coastline to the tile boundaries (so that the Do you mean using splitter? I am not using splitter at the moment since the data is small enough as one img.
last bit of coastline is a straight N-S or W-E line). I played with the idea of merging real coastline of neighbour countries to the map, but that did not work out, and it would have been less obvious to see where the mapped territory ends.
Moving the coastline endpoints can be done with a trivial Perl or sed script. See my osm2img.sh at http://www.polkupyoraily.net/osm/ for an example. To find the endpoints of your map extract, you can extract the natural=coastline ways from your map extract and load that to JOSM.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

Dear Maning,
Unless your map extract is a perfect island, you may have to move the coastline endpoints to make mkgmap happy. I think it is, the Philippines is an island/archipelagic country:
What matters is the map extract that you are using. If it contains half-cut islands from, say, Indonesia, then mkgmap may have problems with that.
coastline generation for Finland, I both adjusted the Geofabrik cutting polygon (it took a few iterations with Frederik Ramm) and moved the endpoints of the mainland coastline to the tile boundaries Do you mean using splitter? I am not using splitter at the moment since the data is small enough as one img.
No, I mean the map extract that I can download from http://download.geofabrik.de/osm/europe/. To my knowledge, it is cut by Osmosis, using a cutting polygon. I requested the polygon from Frederik and adjusted it a little, so that all of the Finnish administrative boundary was included in the extract and all lake multipolygons near the border were intact. I do use splitter to split the map extract further (currently into 6 tiles), but that is a separate issue. Marko

Dear Marko, Thanks for the explanation. I've checked my old builds and there aren't any data outside the Philippines. I'll check the latest extract if there by getting only the coastlines ways using osmosis and josm. On Wed, Sep 8, 2010 at 3:03 PM, Marko Mäkelä <marko.makela@iki.fi> wrote:
Dear Maning,
Unless your map extract is a perfect island, you may have to move the coastline endpoints to make mkgmap happy. I think it is, the Philippines is an island/archipelagic country:
What matters is the map extract that you are using. If it contains half-cut islands from, say, Indonesia, then mkgmap may have problems with that.
coastline generation for Finland, I both adjusted the Geofabrik cutting polygon (it took a few iterations with Frederik Ramm) and moved the endpoints of the mainland coastline to the tile boundaries Do you mean using splitter? I am not using splitter at the moment since the data is small enough as one img.
No, I mean the map extract that I can download from http://download.geofabrik.de/osm/europe/. To my knowledge, it is cut by Osmosis, using a cutting polygon. I requested the polygon from Frederik and adjusted it a little, so that all of the Finnish administrative boundary was included in the extract and all lake multipolygons near the border were intact.
I do use splitter to split the map extract further (currently into 6 tiles), but that is a separate issue.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

I extracted the coastline ways with osmosis and loaded them in JOSM. No other data except the Philippine coasts. There are two unconnected coastlines which I corrected. Apparently a portion of the way was used in a multipolygon relation. I don't think this is the culprit because other islands should be rendered even if one coastline wasn't closed. I then updated mkgmap to the latest svn but no sea polygons either. On Wed, Sep 8, 2010 at 7:26 PM, maning sambale <emmanuel.sambale@gmail.com> wrote:
Dear Marko,
Thanks for the explanation. I've checked my old builds and there aren't any data outside the Philippines. I'll check the latest extract if there by getting only the coastlines ways using osmosis and josm.
On Wed, Sep 8, 2010 at 3:03 PM, Marko Mäkelä <marko.makela@iki.fi> wrote:
Dear Maning,
Unless your map extract is a perfect island, you may have to move the coastline endpoints to make mkgmap happy. I think it is, the Philippines is an island/archipelagic country:
What matters is the map extract that you are using. If it contains half-cut islands from, say, Indonesia, then mkgmap may have problems with that.
coastline generation for Finland, I both adjusted the Geofabrik cutting polygon (it took a few iterations with Frederik Ramm) and moved the endpoints of the mainland coastline to the tile boundaries Do you mean using splitter? I am not using splitter at the moment since the data is small enough as one img.
No, I mean the map extract that I can download from http://download.geofabrik.de/osm/europe/. To my knowledge, it is cut by Osmosis, using a cutting polygon. I requested the polygon from Frederik and adjusted it a little, so that all of the Finnish administrative boundary was included in the extract and all lake multipolygons near the border were intact.
I do use splitter to split the map extract further (currently into 6 tiles), but that is a separate issue.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Thu, Sep 09, 2010 at 12:20:37PM +0800, maning sambale wrote:
I extracted the coastline ways with osmosis and loaded them in JOSM. No other data except the Philippine coasts. There are two unconnected coastlines which I corrected. Apparently a portion of the way was used in a multipolygon relation. I don't think this is the culprit because other islands should be rendered even if one coastline wasn't closed.
I then updated mkgmap to the latest svn but no sea polygons either.
Can you create working sea polygons from the natural=coastline extract of your map extract? If not, can you make the natural=coastline extract and your mkgmap options available for download? Marko

Sure. http://dl.dropbox.com/u/607635/osm_stuff/coast_philippines.zip The zip contains: coastline data args.list osm-ph styles folder On Thu, Sep 9, 2010 at 2:29 PM, Marko Mäkelä <marko.makela@iki.fi> wrote:
On Thu, Sep 09, 2010 at 12:20:37PM +0800, maning sambale wrote:
I extracted the coastline ways with osmosis and loaded them in JOSM. No other data except the Philippine coasts. There are two unconnected coastlines which I corrected. Apparently a portion of the way was used in a multipolygon relation. I don't think this is the culprit because other islands should be rendered even if one coastline wasn't closed.
I then updated mkgmap to the latest svn but no sea polygons either.
Can you create working sea polygons from the natural=coastline extract of your map extract? If not, can you make the natural=coastline extract and your mkgmap options available for download?
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Thu, Sep 09, 2010 at 04:16:26PM +0800, maning sambale wrote:
Sure.
http://dl.dropbox.com/u/607635/osm_stuff/coast_philippines.zip
The zip contains: coastline data args.list osm-ph styles folder
I got an exception when trying your style and args. I didn't dig deeper. By the way, specifying "ea" in args.list has no effect. It is a Java parameter, not mkgmap parameter. mkgmap did log these before crashing: 2010/09/09 12:59:20 WARNING (Osm5XmlHandler): ph_coastline.osm: Non-closed coastline segment does not hit bounding box: 892720649 (11,48494/124,39909) 312537247 (10,99141/124,62028) http://www.openstreetmap.org/?mlat=11.48494&mlon=124.39909&zoom=17 2010/09/09 12:59:20 WARNING (Osm5XmlHandler): ph_coastline.osm: Non-closed coastline segment does not hit bounding box: 312537255 (10,98998/124,62054) 892720555 (11,48520/124,39952) http://www.openstreetmap.org/?mlat=10.98998&mlon=124.62054&zoom=17 I got the same warnings with my command line, using generate-sea=multipolygon instead of your generate-sea=polygons: java -ea -Xmx1024m -Dlog.config=logging.properties -jar mkgmap.jar --gmapsupp --generate-sea=multipolygon ph_coastline.osm You can get the file logging.properties from my page at http://www.polkupyoraily.net/osm/. I loaded the file ph_coastline.osm to JOSM. And sure enough, I can see gaps between these nodes: id:892720555 and id:892720649 id:312537255 and id:312537247 The OSM database looks OK, you are just missing ways between these nodes. Please ask for the cutting polygon and load it and ph_coastline.osm to JOSM. Extend the cutting polygon so that the missing ways will be included, send it back, and wait for the results. If you are using Geofabrik extracts, the contact person should be Frederik Ramm. Marko

Dear Marko, Fixing the two unconnected coastlines, sea-polygon is now visible! Thanks for helping debug the problem.
2010/09/09 12:59:20 WARNING (Osm5XmlHandler): ph_coastline.osm: Non-closed coastline segment does not hit bounding box: 892720649 (11,48494/124,39909) 312537247 (10,99141/124,62028) http://www.openstreetmap.org/?mlat=11.48494&mlon=124.39909&zoom=17
2010/09/09 12:59:20 WARNING (Osm5XmlHandler): ph_coastline.osm: Non-closed coastline segment does not hit bounding box: 312537255 (10,98998/124,62054) 892720555 (11,48520/124,39952) http://www.openstreetmap.org/?mlat=10.98998&mlon=124.62054&zoom=17
I got the same warnings with my command line, using generate-sea=multipolygon instead of your generate-sea=polygons:
Am I right to assume that, with generate-sea=polygons a single land polygon (with many islands) was created. So when a single island way is unconnected, the whole polygon creation stopped? Does the generate-sea=multipolygon resolve this? -- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

On Thu, Sep 09, 2010 at 07:01:45PM +0800, maning sambale wrote:
Am I right to assume that, with generate-sea=polygons a single land polygon (with many islands) was created. So when a single island way is unconnected, the whole polygon creation stopped?
Does the generate-sea=multipolygon resolve this?
I don't know, I have only used generate-sea=multipolygon, which creates nasty lines around small islands. generate-sea=multipolygon also has the problem that no polygons are created for islands by default, and thus islands will not be named by default. I believe that your original problem was a case of "garbage in, garbage out". No system can be perfect. My solution is to weed out "noise" warnings with my logging.ignore file and address every warning that gets through the filter, either by correcting the map extract (usually map data) or by adding another exception to the filter. It took some considerable effort to fix all erroneous roundabouts, turning restrictions, dead-end oneways and multipolygons. Marko
participants (2)
-
maning sambale
-
Marko Mäkelä