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

How to download OSM data in specified region with specific tag (I.E. highway)

0

I want to download OSM data in *.shp format for specified region with specified tag (in example highway).

There are any web services for doing that or I should write a script?

asked 20 Nov '15, 04:45

Nojarathma's gravatar image

Nojarathma
26114
accept rate: 0%

edited 20 Nov '15, 05:22

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


One Answer:

2

There are some web sites where you can download ready-made shape files (e.g. extract.bbbike.org, download.geofabrik.de) but you cannot choose which tags you want. If you want to create your own shape file, download the OSM data in .osm.pbf format and then use e.g. osm2pgsql to import to PostGIS, then pgsql2shp to create shape file, or use a modern version of ogr2ogr to convert from pbf to shp directly. More: https://wiki.openstreetmap.org/wiki/Shapefiles

answered 20 Nov '15, 06:49

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

2

If the "region" isn't too big, using Overpass-Turbo might be easier. For example, download all highway ways: http://overpass-turbo.eu/s/cPW . Then use QGIS for conversion to SHP.

(20 Nov '15, 07:18) joost schouppe

Source code available on GitHub .