0

I'm trying to create a geojson file with a few shapes of roads from OSM. Now, I've been able to get shapefiles of the greater region (province) these roads are in from http://download.geofabrik.de/ . I've also been able to convert a shape file to geojson using ogr2ogr. My problem is that it contains way too much data. Is there a way to filter a shapefile or geojson file by name, type or ID?

  • The usual approach is to import source OSM data into postgis, or to do a simple extract using the overpass API. Otherwise, which of your 4 questions is the one that should be answered? – BradHards Apr 20 '14 at 5:37
  • Thanks. You're right. I've cleaned up the post a bit. The main issue is filtering. Thanks for your answer, that's very helpful. – Danny_Joris Apr 20 '14 at 5:53
1

ogr2ogr supports filtering, by using the where clause. http://www.gdal.org/ogr2ogr.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.