Hello,

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, 17:52

HaavardHolm's gravatar image

HaavardHolm
114
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, 07:54

Jochen%20Topf's gravatar image

Jochen Topf
4.6k54665
accept rate: 32%

Ok, thanks again !

Best regards, Håvard

(23 Mar, 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, 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

By RSS:

Answers

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:

×3

question asked: 22 Mar, 17:52

question was seen: 178 times

last updated: 24 Mar, 07:33

powered by OSQA