Coastline Eemscentrale not connected

When using osmcoastline on a map in the area of Eemhaven, there is an error message that reads

“Closing ring between node 2730742930 and node 48484912” I have captured this note

https://www.openstreetmap.org/note/5219939#map=14/53.43725/6.89426&layers=N

because I was not sure how to fix it. Looking at the osmcoastline output for the map in the proximity of Niedersachsen, there are a few of these messages. The broken map causes rendering problems with navigation software as discussed here: How to stop the flooding? · Issue #1399 · navit-gps/navit · GitHub

It would be great if we could fix it somehow. Being new I am unsure of the procedure and was sent here when asking in openstreetmap@conference.macaw.me

I have searched but so far it is not even clear where between those two nodes the actual problem exists.

The coastline is fine, as you can see here: OSM Inspector | Geofabrik Tools

The problem most likely stems from you using an in-exact extract of the OSM data that somehow cuts of some data here. I suggest you either just download the coastline data from https://osmdata.openstreetmap.de/ or use a larger OSM extract and cut the coastline to the needed area after processing. That way you don’t get weird problems around the boundaries.

This problem was likely caused by parts of the Netherlands coastline being included in Geofabrik’s Niedersachsen export, and that has been repaired in avoid including Dutch coastline in Niedersachsen file · geofabrik/polygons_download.geofabrik.de@a85bad4 · GitHub - however, due to the fact that multipolygon relations are completed when Geofabrik build their extracts, something like this can always happen - imagine a large multipolygon that has among its members some coastline bits in Germany and some in the Netherlands, but not the complete coastline. This would lead to a patchy Netherlands coastline being included in the Germany (or Niedersachsen) extract.

Haha, then we can all have the conversation here :slight_smile:

I do appreciate the help a lot, thank you very much. By both of you, @Jochen_Topf and @woodpeck

I attempted to do another osmium extract using the very same poygon cutout. Unfortunately that did not yet help as there are still artefacts. If I remove the coastline entirely, then the map looks ok except at the coast, which is an improvement except when I need these areas at the coast.

osmcoastline seems to be able to close the open rings, and write its output to a spatial database but I cannot get it to output a pbf file, nor have I found another tool that could convert the spatial db to pbf. I tried

spatialite_osm_filter -d test -o test.osm -w wk
SQLite version: 3.46.1
SpatiaLite version: 5.1.0

DB ‘test’
doesn’t seems to contain valid OSM-RAW data …

for this content of the file wk:

POLYGON((6.295165 51.293485, 6.295165 54.239552, 11.607313 54.239552, 11.607313 51.293485))

The goal of this is to process a pbf file that may contain coastline-debris from adjacent map areas and fix it with osmcoastline before using the result in a navigation tool.

That’s not something you can do with osmcoastline.