I download denmark-latest.osm.pbf from geofabrik, then I run osmcoastline: osmcoastline -o coastline.db denmark-latest.osm.pbf

Then convert to shape : ogr2ogr -f "ESRI Shapefile" land_polygons.shp coastline.db land_polygons

Then I view the land_polygons.shp in qgis, but now half of Denmark is gone.

What have I done wrong ??

Best regards Håvard

asked 22 Mar '20, 17:52

HaavardHolm's gravatar image

accept rate: 0%

Generally you can not run OSMCoastline on extracts. OSMCoastline assembles ways into continuous coastline linestrings and then into land and water polygons. But if the coastline is not closed, it can't do that. This might work if your extract only contains an island, but Denmark isn't an island, so you can't determine its land area from the coastline.

permanent link

answered 23 Mar '20, 07:54

Jochen%20Topf's gravatar image

Jochen Topf
accept rate: 30%

Ok, thanks again !

Best regards, Håvard

(23 Mar '20, 10:23) HaavardHolm

Are there other ways to separate the coastline for each country ?

I notice the webpage : https://osmdata.openstreetmap.de/data/land-polygons.html, however I need to split into separate country. Could administrative borders be used ?

Best regards Håvard

(24 Mar '20, 07:33) HaavardHolm
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Mar '20, 17:52

question was seen: 730 times

last updated: 24 Mar '20, 07:33

powered by OSQA