5

Although I am a Openstreetmap's regular user for quite some time, I am pretty new to GIS, so I assume this is an easy question: I would like to know how can I extract data (eg: all schools) from OSM within a certain area defined by a polygon (eg: a city boundary or a city's neighbourhood) using QGIS.

Extracting data

I have searched a bit about it and I found out (correct me if I am wrong) that there are different ways to perform queries on OSM, although I don't understand how/when do I have to use each one:

  1. Osmosis
  2. Overpass
  3. XAPI

Using polygons

The problem is that as far (or as little) as I know all these methods rely on a square area, and I would like to know how can I do that within two types of polygons:

  1. A city's boundary (this polygon exists in OSM, since is the one you see when searching for an specific city)
  2. An arbitrary area, which would require to draw a new polygon using an external software (possibly QGIS? JOSM?).
2
  • 1
    How does QGIS fit with this data retrieval question? You can do the arbitrary area with wiki.openstreetmap.org/wiki/Overpass_API/… but perhaps you need to ask a more specific question. Don't try to generalise - ask one direct question, and work from that to something more general later (either yourself, or via more questions).
    – BradHards
    Jan 13, 2014 at 8:55
  • you may want to extract schools from Overpass-api: some schools are included as nodes, while others are areas (polygons or multipolygons), or both. nodes, ways and relations - All kind of objects cf wiki.openstreetmap.org/wiki/Overpass_API/…
    – zero
    Jun 13, 2014 at 16:38

2 Answers 2

5

Overpass API allows you to extract by polygon:

http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Select_Region_by_Polygon

which should fill your needs.

You can use QGIS to draw the desired polygon, then extract the coordinates with the MMQGIS plugin.

5

Finally I decided to use Quick OSM plugin, which allows you to make a query based on a territory name or a layer (which can contain vectors).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.