Sunday, 14 August 2016

openstreetmap - Opening OSM files in QGIS?




I am trying to import an OSM file of a State Park that was added in OpenStreetMap into QGIS, and it seems no matter what I do, I just cannot get it to work.


I've installed a bunch of plugins, etc, but nothing.



Answer



GDAL/OGR can read OSM format and in theory it is possible to open OSM files directly with QGIS (don't forget to switch to All files, I've just tried in QGIS 2.12 on Ubuntu and it works, but my QGIS is compiled with GDAL 2.0). QGIS will ask you to select type of features. However in practice I found it not always working (OSGeo4W QGIS couldn't open it in my case). You can try.


If it doesn't work you can go this route:



  1. Go to http://overpass-turbo.eu

  2. Navigate to an area where your park is


  3. Type in a query:



    way [leisure=park] ({{bbox}}); (._;>;); out;




  4. Hit Run



  5. Export result as GeoJSON

  6. Open in QGIS


Working example for a State park


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...