NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

How would I best obtain all the schools (amenity=school) in the OSM database?

This question asks how to do it for a specific location:

And the answer is the use the Overpass API or XAPI.

In my case, I want all the schools. The following is a question along those lines:

However it dates back to 2012, and the most upvoted answer recommends to download a full planet dump (tens to hundreds of gigs) and retrieve what you want using a tool like Osmosis or OSMFilter.

Is there a better way?

asked 05 Sep '18, 16:57

mitchus's gravatar image

accept rate: 0%

edited 05 Sep '18, 17:14

If you need all the school data (~1 million of uses around the world), downloading planet file in PBF, which is only ~40 GB (not hundreds), and filtering them is the best option. Overpass has limits and might slow down your browser with such amount of data.

permanent link

answered 05 Sep '18, 18:08

kocio's gravatar image

accept rate: 20%


After having downloaded the planet file, you could now use the Osmium command line tool (which wasn't available in 2012) to filter out the schools you are interested in. You have a big request and you need to be prepared to put a little bit of work in - OSM gives you all the data for free but it can't afford to give you the processing for free too.

(05 Sep '18, 20:01) Frederik Ramm ♦
(05 Sep '18, 23:26) kocio

Note that you can use curl or wget whatever to retrieve a result from Overpass-API. Then the server limitations are likely to be the only issue.

Still, for global results Overpass-API is unlikely to be the right approach.

(06 Sep '18, 01:08) maxerickson
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Sep '18, 16:57

question was seen: 5,145 times

last updated: 06 Sep '18, 01:08

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum