Re: [OSM-talk] routing and distance calculation

2011-08-01 Thread kenneth gonsalves
On Tue, 2011-07-26 at 01:21 +0530, bharath vissapragada wrote:
 If cpp is fine with you .. I would suggest osrm (
 http://project-osrm.org/ ). Its an excellent tool for route
 computation  and can return various standard formats (KML,JSON,GPX ).
 It also provides a web service for querying and you can parse the json
 u get after querying from your python code. 

thanks - it's good. Btw, how does one get json? I only see kml.


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] routing and distance calculation

2011-07-25 Thread kenneth gonsalves
hi,

I need a command line tool to get the distance between two points by the
shortest route - preferably in python. Recommendations?
-- 
regards
Kenneth Gonsalves




___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] routing and distance calculation

2011-07-25 Thread Kenneth Gonsalves
hi,

I need a command line tool to get the distance between two points by the
shortest route - preferably in python. Recommendations?
-- 
regards
Kenneth Gonsalves


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] routing and distance calculation

2011-07-25 Thread Jorge Gustavo

Hi K,

The wiki[1] is a good starting point. There is also a more specific 
mailing list[2] dedicated to routing.


Regards,

Jorge

[1] http://wiki.openstreetmap.org/wiki/Routing
[2] http://lists.openstreetmap.org/listinfo/routing

On 25-07-2011 08:56, kenneth gonsalves wrote:

hi,

I need a command line tool to get the distance between two points by the
shortest route - preferably in python. Recommendations?



___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] routing and distance calculation

2011-07-25 Thread kenneth gonsalves
On Mon, 2011-07-25 at 10:28 +0200, yve...@gmail.com wrote:
 Pyroute

tried it - but get this error:

[lawgon@xlquest pyroute]$ python gui.py 
[poi_base.poiGroup instance at 0x952cfcc, poi_base.poiGroup instance
at 0x952cf6c]
Loading POIs from /home/lawgon/pyroute/Setup/poi.txt
Error while parsing file
No GPSD detected, position information will not be available
No such tracklog data/sketches/latest.gpx
No such tracklog data/track.gpx
Loading OSM data from data/routing.osm
No such data file data/routing.osm
Downloading tah_9_254_169
Traceback (most recent call last):
  File gui.py, line 336, in do_expose_event
return self._expose_cairo(event, cr)
  File gui.py, line 332, in _expose_cairo
self.draw(cr)
  File gui.py, line 257, in draw
self.modules['tiles'].draw(cr)
  File /home/lawgon/pyroute/tiles.py, line 156, in draw
self.loadImage(x,y,z,layer)
  File /home/lawgon/pyroute/tiles.py, line 107, in loadImage
downloadTile(x,y,z,layer,filename)
  File /home/lawgon/pyroute/tiles.py, line 41, in downloadTile
urllib.urlretrieve(url, filename)
  File /usr/lib/python2.7/urllib.py, line 91, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
  File /usr/lib/python2.7/urllib.py, line 237, in retrieve
fp = self.open(url, data)
  File /usr/lib/python2.7/urllib.py, line 205, in open
return getattr(self, name)(url)
  File /usr/lib/python2.7/urllib.py, line 342, in open_http
h.endheaders(data)
  File /usr/lib/python2.7/httplib.py, line 937, in endheaders
self._send_output(message_body)
  File /usr/lib/python2.7/httplib.py, line 797, in _send_output
self.send(msg)
  File /usr/lib/python2.7/httplib.py, line 759, in send
self.connect()
  File /usr/lib/python2.7/httplib.py, line 740, in connect
self.timeout, self.source_address)
  File /usr/lib/python2.7/socket.py, line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known
Handling last few checks before we close



___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] routing and distance calculation

2011-07-25 Thread yvecai

On 25. 07. 11 11:51, kenneth gonsalves wrote:

On Mon, 2011-07-25 at 10:28 +0200, yve...@gmail.com wrote:

Pyroute

tried it - but get this error:

[lawgon@xlquest pyroute]$ python gui.py
[poi_base.poiGroup instance at 0x952cfcc,poi_base.poiGroup instance
at 0x952cf6c]
Loading POIs from /home/lawgon/pyroute/Setup/poi.txt
Error while parsing file
No GPSD detected, position information will not be available
No such tracklog data/sketches/latest.gpx
No such tracklog data/track.gpx
Loading OSM data from data/routing.osm
No such data file data/routing.osm
Downloading tah_9_254_169
Traceback (most recent call last):
   File gui.py, line 336, in do_expose_event
 return self._expose_cairo(event, cr)
   File gui.py, line 332, in _expose_cairo
 self.draw(cr)
   File gui.py, line 257, in draw
 self.modules['tiles'].draw(cr)
   File /home/lawgon/pyroute/tiles.py, line 156, in draw
 self.loadImage(x,y,z,layer)
   File /home/lawgon/pyroute/tiles.py, line 107, in loadImage
 downloadTile(x,y,z,layer,filename)
   File /home/lawgon/pyroute/tiles.py, line 41, in downloadTile
 urllib.urlretrieve(url, filename)
   File /usr/lib/python2.7/urllib.py, line 91, in urlretrieve
 return _urlopener.retrieve(url, filename, reporthook, data)
   File /usr/lib/python2.7/urllib.py, line 237, in retrieve
 fp = self.open(url, data)
   File /usr/lib/python2.7/urllib.py, line 205, in open
 return getattr(self, name)(url)
   File /usr/lib/python2.7/urllib.py, line 342, in open_http
 h.endheaders(data)
   File /usr/lib/python2.7/httplib.py, line 937, in endheaders
 self._send_output(message_body)
   File /usr/lib/python2.7/httplib.py, line 797, in _send_output
 self.send(msg)
   File /usr/lib/python2.7/httplib.py, line 759, in send
 self.connect()
   File /usr/lib/python2.7/httplib.py, line 740, in connect
 self.timeout, self.source_address)
   File /usr/lib/python2.7/socket.py, line 553, in create_connection
 for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known
Handling last few checks before we close
Ok, I never tryed the guy (or did, but with errors). However PyrouteLib 
works well, I use it there: www.pistes-nordiques.org.
You'll find the simplified pyroutelib I uses on the website in 
http://dev-yves.dyndns.org/repository/www.pistes-nordiques.org/www.pistes-nordiques.org.tar 
at /pistes-nordiques-frontend/cgi/handler/routing.py


Yves

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk