![]() ![]() Ogr2ogr is flexible and has lots of options. Place your own BBOX into the -spat parameter in EPSG:4326 units. Ogr2ogr -f "ESRI Shapefile" -spat 76 22 77 23 -sql "select * from multipolygons where natural='water'" lakes.shp -config ogr_interleaved_reading yes Ogr2ogr -f "ESRI Shapefile" -spat 76 22 77 23 -sql "select * from lines where waterway='river'" rivers.shp -config ogr_interleaved_reading yes If your aim is to make shapefiles you must save rivers and lakes to different files because lines and polygons can't be saved into a same shapefile.Įxamples below are using the file from geofabrik. Lakes you find by "natural=water" and they go to layer "multipolygons". Rivers can be found from the OSM data by tag "waterway=river" and GDAL saves them into layer "lines". Apply a Provider Feature Filter ( Properties -> Source -> Provider Feature Filter) with the following query: 'waterway' IS NOT NULL. This task with rivers and lakes can be done with default settings but it is often necessary to edit the osmconf.ini file first. As mentioned in the comments the best way to extract all waterways: Convert the pbf into a sqlite database described here for example: ogr2ogr -f SQLite saarland-latest.sqlite. Install GDAL version 1.10 or higher and read the manual pages of the OSM driver and ogr2ogr. You can filter your OSM data with GDAL by bounding box and by attributes and save the results directly into any vector format that is supported by GDAL. set of tools for processing OpenStreetMap data into vector maps. In your case, you could also use the waterway=river query to get all the rivers in the area you're after, and you can draw a manual selection box to narrow down the showed me this. (2017) evaluated the potential of OSM for extracting information about natural local. You can do a 'save as' to save it as a new type of vector layer. The query will run and the result will show on the map: Using information, the name value is South Platte River, and the waterway value is river, so you can build a query like this: name="South Platte River" and waterway=river Then go on over to the Overpass Turbo page, then click Wizard The Tags and Values appear on left side of the screen, and you can proceed below.The features on the map turn blue (make sure you're zoomed in far enough to see.Click on the last menu entry ( Map data or something similar in your language).Click on the layers icon on the right (the three sheets of paper).This gives the fields and tags that are used by OSM to store the data:Ģ) Identify the tags and values of the features you're after by ![]() ![]() I chose "south platte river", which runs through Denver.
0 Comments
Leave a Reply. |