Using OSM POIs in QGIS
Extracting POIs from OpenStreetMap is reasonably simple using Overpass API. A very convenient way to construct the query is to use a query builder which allows you to select the area of interest and builds queries for different servers.
Of course you can fine-tune the query further. For example, you can add multiple key-value pairs to the query. I used the following query to select all Billa supermarkets:
www.overpass-api.de/api/xapi?*[shop=supermarket][name=Billa][bbox=15.96725,48.0432,16.79947,48.40915]
Note the * in the query? It means that I’m querying all kinds of features: nodes, ways, and relations.
Save the server response to a .osm file. This file can be loaded into QGIS using simple drag-and-drop or Add Vector Layer. A dialog will open where you can select the type of features you want to load from the file. You can simply use Select All and OK to load everything.
My supermarket POIs came in two types: points and multipolygons. To style them both with nice supermarket SVG icons, I decided to use a Centroid fill with the SVG marker for the polygon layer:
Open data and open source GIS … nice :-)
How I make this: save the server response to a .osm file? Copy and paste to a file? Thanks.
If your browser displays the response text, try ctrl+S. That should allow you to save.
Hi,
A very basic question, how can I add multiple key-value?
I try to add it in the value box like that “(shop=supermarket)(name=continente)” but result in the Overpass API was:
http://www.overpass-api.de/api/xapi?*%5B(shop=supermarket)(name%3Dcontinente)%5D%5Bbbox=-8.55011,40.08017,-7.87994,40.41768%5D
Thanks,
Pedro
You really have to use the square brackets as shown in the example.