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?– BradHardsCommented Apr 20, 2014 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_JorisCommented Apr 20, 2014 at 5:53
Add a comment
|
1 Answer
ogr2ogr supports filtering, by using the where clause. http://www.gdal.org/ogr2ogr.html