Just playing a little today. I’m at Cleveland Give Camp today, working on a project for Ohio City Writers, a non-profit youth creative writing center. I’m deploying some maps for the registration site, that will be filterable, using CartoDB as a host for the data. As I don’t know what we’re going to filter, or where the page will go yet, I was trolling around trying to find alternate data sources for things like locations of schools.
OpenStreetMap has a search service called Nominatim that allows for search of geographic objects across the world. This is one of the tools that used on the OSM landing page when you search for a location.
This post won’t be much more than a reflector for the documentation, but it’s a nice easy to use service, i.e.:
http://nominatim.openstreetmap.org/search/<query>?<params>
and e.g.:
http://nominatim.openstreetmap.org/search/school,cleveland,oh
By default, it returns with HTML. If we want xml or json, that’s not so hard:
http://nominatim.openstreetmap.org/search/school,cleveland,oh?format=json
returning:
[{ "place_id" : "3095185", "licence" : "Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0.", "osm_type" : "node", "osm_id" : "357479537", "boundingbox" : [41.482427825928, 41.502431640625, -81.717878112793, -81.697870483398], "lat" : "41.4924303", "lon" : "-81.707872", "display_name" : "Urban Community School, W 25th St, Detroit-Shoreway, Cleveland, Cuyahoga, Ohio, 44109, United States of America", "class" : "amenity", "type" : "school", "icon" : "http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/education_school.p.20.png" }, { "place_id" : "3100746", "licence" : "Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0.", "osm_type" : "node", "osm_id" : "357508524", "boundingbox" : [41.451994171143, 41.47199798584, -81.720136413574, -81.70012878418], "lat" : "41.4619957", "lon" : "-81.7101311", "display_name" : "Blessed Sacrament School (historical), Trowbridge, Cleveland, Cuyahoga, Ohio, 44109, United States of America", "class" : "amenity", "type" : "school", "icon" : "http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/education_school.p.20.png" } //... etc. ]
I may have to use this for a future geographic search application. I so often have to append OpenStreetMap’s Copyright on my applications anyway… .