import json, requests
#orig= (48.87042, 2.39785)
orig= (50.67673, 3.11186)
depTime = "08:00:00"
cutoff = 600 #in seconds 600 s = 10 min
#modes = "BICYCLE"
#modes = "WALK"
modes = "BUS"
#modes = "TRANSIT,WALK"
baseURL = 'http://localhost:8080/otp/routers/default/isochrone?'
qryDT = '&date=2015/12/7&time={0}&mode={1}&cutoffSec={2}'.format(depTime, modes, cutoff)
url = '{0}fromPlace={1}&{2}'.format(baseURL, orig, qryDT)
response = requests.get(url)
data = json.loads(response.text)
with open('iso_bus_10min.geojson', 'w') as outfile:
json.dump(data, outfile)
This python script works for WALK, BIKE and CAR modes but fails when I set TRANSIT or simply BUS
org.opentripplanner.routing.error.TransitTimesException null
http://localhost:8080/otp/routers/default/isochrone?fromPlace=(50.67673, 3.11186)&&date=2015/12/7&time=08:00:00&mode=BUS,WALK&cutoffSec=600
no date in it, How could I specify the date?
This error is troubling because on the web interface I am able to draw itineraries.
Alain
http://localhost:8080/otp/routers/default/isochrone?fromPlace=(50.67673, 3.11186)&&date=2015/12/7&time=08:00:00&mode=BUS,WALK&cutoffSec=600
no date in it, How could I specify the date?