[OSM-talk] planet.osm powered "where am I"
Nick Burch
openstreetmap at gagravarr.org
Tue Jul 25 08:10:12 BST 2006
Hi All
I've knocked up a little REST service for querying planet.osm for where you
happen to be near.
If you give it your current lat+long, what you're interested in (places or
roads), how far to look (in meters), and what format (xml or html), it'll
find tagged nodes and segments, and tell you about them.
For example, if we ask it for main roads near my house:
http://gagravarr.org/cgi-bin/where_am_i.py?lat=51.716243333&long=-1.238533333&roads&dist=750&format=xml
You get back:
<roads>
<road ref="None" type="secondary" distance="430">None</road>
<road ref="None" type="primary" distance="502">A4074</road>
<road ref="None" type="trunk" distance="648">Heyford Hill Roundabout</road>
<road ref="None" type="trunk" distance="712">A4074 Southern Bypass</road>
<road ref="None" type="trunk" distance="741">A4142</road>
</roads>
It is available at http://gagravarr.org/cgi-bin/where_am_i.py . Code is at
http://gagravarr.org/code/, take a look in the header for the options.
Feedback welcome :)
Nick
More information about the talk
mailing list