- I downloaded the openstreetmap of Saxony from geofabrik
- I saved the file
sachsen-latest.osm.pbf
- use ogrinfo to show the layers
ogrinfo sachsen-latest.osm.pbf
: Had to open data source read-only.
: INFO: Open of `sachsen-latest.osm.pbf'
: using driver `OSM' successful.
: 1: points (Point)
: 2: lines (Line String)
: 3: multilinestrings (Multi Line String)
: 4: multipolygons (Multi Polygon)
: 5: other_relations (Geometry Collection)
- then use
ogr2ogr
to transform a layer to a shapefile
- additional I used the
spat
argument for only including the Leipzig region
ogr2ogr -spat 12.2 51.2 12.6 51.45 -f "ESRI Shapefile" sachsen2.osm.pbf sachsen-latest.osm.pbf multipolygons
Author: Mandy Vogel
Created: 2014-08-08 Fr 09:25
Emacs 24.3.1 (Org mode 8.2.5h)
Validate
No comments :
Post a Comment