This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

osmcoastline

0

Hello,

I have some problems with osmcoastline, hope some can help ! I want to extract the land polygons and want them in shape-format.

osmcoastline -V osmcoastline version 2.1.2 Copyright (C) 2012-2016 Jochen Topf jochen@topf.org License: GNU GENERAL PUBLIC LICENSE Version 3 http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

I run osmcoastline: osmcoastline -o coastline.db cyprus-latest.osm.pbf There were 0 warnings. There were 0 errors.

Then I want the output in shape-format: ogr2ogr -f "ESRI Shapefile" land_polygons.shp coastline.db land_polygons FAILURE: Unable to open datasource coastline.db' with the following drivers. ->PCIDSK' + long list of alternative formats

Am I doing something wrong? How to get the data in shape-format ?

Best regards Håvard

asked 17 Feb '20, 08:37

HaavardHolm's gravatar image

HaavardHolm
11334
accept rate: 0%


One Answer:

0

First, there are pregenerated coastlines available from here. It might be easier to just use those. Second, your version of osmcoastline is pretty old, I'd suggest using a more current version. Third, it seems osmcoastline did its job and ogr2ogr didn't so this doesn't really have anything to do with osmcoastline, but with ogr2ogr. You left out the most important pieces of information, that is the "long list of alternative formats". You should have a format "SQLite / Spatialite" or something like it in there. If you don't then your version of ogr2ogr doesn't have the necessary driver.

answered 17 Feb '20, 16:28

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

Thank you Jochen,

All your comments was to the point. The problem was my ogr2ogr.

Best regards Håvard

(18 Feb '20, 09:07) HaavardHolm

Source code available on GitHub .