[GIS] Using QuickOSM to select more values in key

quickosm

In using QGIS, I would like to select several values at once within the same key in QuickOSM.

I'm not at all familiar with coding!

Can someone suggest a simple point-by-point method to do this?

An example would be:

  • In Quick Queries, I select "amenities" under Key. Under Value, I'd like to select colleges, schools, hospitals.

Is there a way to do this, so that I don't have to do one at a time?

Best Answer

The QuickOSM plugin dialogue also has an option to use a query from the Overpass Turbo API.

http://overpass-turbo.eu/

Here I can construct a query to find amenities = bench and townhall using the wizard:

amenity = bench or amenity = townhall

The query runs and the results show, but the code to run this shows on the side:

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“amenity = bench or amenity = townhall”
*/
[out:json][timeout:25];
// gather results
(
  // query part for: “amenity=bench”
  node["amenity"="bench"]({{bbox}});
  way["amenity"="bench"]({{bbox}});
  relation["amenity"="bench"]({{bbox}});
  // query part for: “amenity=townhall”
  node["amenity"="townhall"]({{bbox}});
  way["amenity"="townhall"]({{bbox}});
  relation["amenity"="townhall"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

Simply copy and paste that query code into the Query pane in QuickOSM, then click Run Query:

enter image description here

If you don't get all the geometry types returning, open up the 'advanced' section to ensure all geometry types are set. At first all geometry types weren't returned. When I opened the 'advanced' tab - without changing anything - and ran the query again, all geometry types came back.

Related Question