[Routing] what road am I travelling along?

OJ W ojwlists at googlemail.com
Fri Jun 20 21:41:40 BST 2008


one of the more pathetic tricks of those proprietary gadgets on the
car dashboard, is that they tell you what road you're on, as if you
didn't know from the signs...


now, anyone with the pyroutelib2 or pyrender applications installed
can now do the same:

http://svn.openstreetmap.org/applications/rendering/pyrender/whatAmIOn.py

> python whatAmIOn.py 51.678935 -0.826256
A4010

> python whatAmIOn.py 50.97886 -0.75829
Bepton Road

> time python whatAmIOn.py 50.92647 -1.28707
Botley Wood to Netley Common
real    0m0.361s
(note: this is a power line. pyrender doesn't assume you're not
travelling along it)

> python whatAmIOn.py 30.2791 120.1251
学院路


if you're following a route that pyroutelib2 generated, the relevant
data tiles should already be in memory and it will work without a
network connection.  if you have a network connection it should always
work.

[filtering by ways accessible to your current vehicle is left as an
excercise for the reader]


regards,

OJW


p.s. please no comments about hardcoding: whatAmIOn{return("caffeine")}...




More information about the Routing mailing list