In a similar idea to http://flowingdata.com/2010/05/25/world-atlas-of-flickr-geotaggers/ and http://flowingdata.com/2010/05/25/map-of-where-toursists-flock/ I would like to extract OSM planet data, say the coordinates of schools, and overlay them on a map so that when zoomed out you would get a kind of heatmap of where the world's schools are. Surely this should be relatively easy but I can't find a tool to do it. OSM planet does give coordinates of points by point type, after all, doesn't it?


There is a tool Osmosis written in JAVA that can be used for advanced data manipulation in OSM format.

For instance you could parse planet.osm and only extract hospitals (geometry and attributes) using:

osmosis --read-xml input.osm --tag-filter accept-nodes amenity=hospital --write-xml output.osm

Actually you could pipe output directly to osm2pgsql command and load data to PostGIS database, or convert osm data to format that is more readable by common GIS software.

I'm not sure how long will it take to parse planet.osm, but you could start with smaller area and work your way up. Also, you can use osmosis to extract a smaller area of interest from planet.osm, if daily prepared extracts don't satisfy your needs.


OpenStreetMap (OSM)'s planet.osm is commonly packaged as XML, and thus its components can be parsed and extracted however you wish. So use your favorite programming language or software tool to parse the data, and, from there, package and place the data on your own map. For instance, if you prefer ArcGIS and don't want to code, you could use tools like http://www.polygongis.com/OSMTranslator.aspx or the http://esriosmeditor.codeplex.com/ to extract the point data of interest. Using those tools (that limit the areal extent of data extracted at any one time), you'll need to separate the world into smaller chunks and merge them back together on your own. You could then do a surface interpolation using your method of choice: IDW, kriging, or whatever.

Be sure to credit OpenStreetMap data per its license.

The OpenStreetMap wiki has a great deal of useful information about the OSM data structure. For instance, see:

Since there are many, many tools to visualize geographic data (and OSM data is easy to transfer into common geographic data types; for instance, http://downloads.cloudmade.com/ offers OSM extracts in numerous formats for free), it would be helpful to enumerate what computational or personal skillsets you have available or would like to use.


A more "standard" GIS approach would be:

  1. Download a POI shapefile from Cloudmade
  2. Generate a heatmap raster in a desktop GIS using a kernel density filter
  3. Export this raster into your favourite map server/tiling package
  4. Serve on the WWW.

But perhaps this approach is a little too 2005 for the cool web-mapping crew here :)


Try the Open Source code just released from OLHeatmap.

  1. OSM Base Map
  2. OSM Data (Points selected by type).
  3. OpenLayers with source code.

What is OLHeatmap ? "Making Open Street Maps even hotter!" [Generates HeatMaps] Blog post & Video http://mapperz.blogspot.com/2010/08/open-layers-heatmaps.html

Credit to Felipe Barriga (http://blog.felipebarriga.cl/)

Generate some heatmaps here: from OSM data (not schools) but gives you an idea.


Not saying this is the perfect solution, but looking into it might help save hours of coding

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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