[OSM-talk] planet.osm powered "where am I"

Simon Hewison simon at zymurgy.org
Wed Jul 26 14:07:27 BST 2006


Nick Burch wrote:
> 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 

Ah, my old stamping ground (actually, the other side of the river).

heading (degrees true) could also be useful,.

This sort of function is pretty much critical for in-car navigation stuff,
but it also needs to work out which direction you are traveling, and work
out what direction the possible nearest roads are, so it can work out which
road you are on at a graded junction.

I can also think of a very good use for this. Feed a script a GPX file, and
it can traverse along the GPX file, and work out if it's on known territory
or not, and if you turn off onto 'uncharted' territory, it could start
building a set of nodes and segments until it meets up with charted
territory again. That way, you wouldn't get the mass duplication that
happens in JOSM if someone absent-mindedly converts a tracklog to the data
layer and uploads without first checking to see what's in that area already.

The problem with it being based on planet.osm is that you would still get
duplication because someone else may have uploaded segments since the last
time the planet.osm got produced.

-- 
Simon Hewison





More information about the talk mailing list