-
Notifications
You must be signed in to change notification settings - Fork 2
How to query itineraries from the API
miraculixx edited this page Dec 18, 2014
·
3 revisions
Found a solution. The key is to query the exact lat/long that the geocode service returns, and (obviously) use a date/time that actually exists ;-)
e.g. GET /otp/routers/default/geocode?query=Mannheim => lat/long GET /otp/routers/default/plan?fromPlace=49.478219,8.472465&toPlace=48.584483,7.734591&time=12:00pm&date=12-18-2014&mode=BUS
This returns the itineraries as expected. Alternatively, the plan API accepts a stop as "stop+<stop_id>::lat,long"
otp builder/server options in order to get this to work without map data:
a) to build: java -Xmx8G -jar /var/otp/otp.jar --build /var/otp/pdx --noStreets --longDistance
b) for the server: java -Xmx6G -Xverify:none -jar /var/otp/otp.jar --noStreets --longDistance --graphs /var/otp/graphs -s -p 80
As an example, I am using this GTFS feed: http://www.gtfs-data-exchange.com/agency/flixbus-gmbh/latest.zip