"Reverse flow" isochrones

213 views
Skip to first unread message

Michael Fitzmaurice

unread,
Feb 20, 2018, 9:54:41 AM2/20/18
to OpenTripPlanner Users
Hi all

I've been making use of OTP's isochrone API for various modes of transport, and I have found it very useful. I'm now wondering if I can use this or another OTP API for "reverse flow" isochrones, where the isochrone represents all the points that can reach a single destination within a given time boundary, i.e. many origins to a single destination, rather than the other way around.

Maarten seems to have raised the same use case a while back in the developers group at https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!searchin/opentripplanner-dev/reverse|sort:date/opentripplanner-dev/Djipx6QyE30/vzF32kMO1SEJ - the answers gave me hope that I can achieve my goal via OTP. Initially I thought it might be as simple as replacing the fromPlace query string parameter with toPlace in the isochrone API call, but this leads to a NullPointerException and an HTTP 500 response because fromParameter is expected to always be supplied.

I can't see anything obvious in the request parameters of the isochrone API or any other endpoint in the HTTP API that looks like it will do what I'm looking for. Can this be done with a single API request?

Thanks

Michael

Andrew Byrd

unread,
Feb 20, 2018, 12:11:34 PM2/20/18
to Michael Fitzmaurice, OpenTripPlanner Users
Hello,

If I remember correctly, this will work “out of the box” if you supply the query parameter to search backward from the destination: arriveBy=true. Because of checks that were originally intended for point-to-point routing it does always expect an origin and a destination but in one-to-many searches the irrelevant one is ignored. I always just supplied the same from and to location. Let us know if you don’t get the expected results using that query parameter.

Regards,
Andrew

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Fitzmaurice

unread,
Feb 20, 2018, 9:03:43 PM2/20/18
to OpenTripPlanner Users
Thanks Andrew, supplying both fromPlace and toPlace with arriveBy=true seems to do the trick. I certainly see a different isochrone. Excellent stuff!

Michael
Reply all
Reply to author
Forward
0 new messages