NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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

HaavardHolm's gravatar image

HaavardHolm
11334
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
5.2k55074
accept rate: 31%

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

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

question was seen: 1,167 times

last updated: 24 Mar '20, 07:33

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum