[GIS] Data visualisation from OSM planet

openstreetmapvisualisation

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?

Best Answer

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.