Ignore OSM for walking

131 views
Skip to first unread message

otptes...@gmail.com

unread,
Aug 19, 2018, 5:24:26 AM8/19/18
to OpenTripPlanner Users
Hello,
I am developping a public transit routing API for developing countries.
As OSM data in these countries can sometimes be inaccurate, transit routing results are often incorrect. 
Is it possible to ignore OSM data for walking segments when calculating paths in transit mode and to rather calculate paths as if the user can walk from point A to B directly (as the crow flies) without having to walk on pedestrian routes ?

Andrew Byrd

unread,
Aug 20, 2018, 1:01:02 AM8/20/18
to otptes...@gmail.com, OpenTripPlanner Users
Hello,

If you don’t supply any OSM data at all, OTP should use straight line distances for transfers. The DirectTransferGenerator class which creates the transfers uses a NearbyStopFinder, which has a switch for using streets or using straight-line distance. The latter is selected when the graph has no streets in it.

Alternatively you should be able to exhaustively list all the transfers that you want to exist in your network in transfers.txt in your GTFS input, then set "useTransfersTxt: true” in build-config.json when building the graph.

-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.

otptes...@gmail.com

unread,
Aug 20, 2018, 1:35:06 AM8/20/18
to OpenTripPlanner Users
Hi,
Thank you for your answer, I already tried this solution but unfortunatly it did not work for me, in fact when I try not supplying OSM data to the graph I am only able to find paths between stops not latlng locations.

Andrew Byrd

unread,
Aug 20, 2018, 4:53:12 AM8/20/18
to otptes...@gmail.com, OpenTripPlanner Users
On 20 Aug 2018, at 13:35, otptes...@gmail.com wrote:
Thank you for your answer, I already tried this solution but unfortunatly it did not work for me, in fact when I try not supplying OSM data to the graph I am only able to find paths between stops not latlng locations.

Hmm, I guess that’s how it’s intended to work at this point - without OSM transfers are straight lines and you can only plan between stations. It wouldn’t be hard to also find the nearest stations to lat/lon endpoints using straight line distance but that’s not implemented.

Unfortunately you’d have to modify the source code to get the behavior you want: You’d need to change this line to add a final “false” boolean parameter to the constructor call:

Longer term, it would be nice if straight line transfer generation were separately configurable, or if lat/lon were accepted when there’s no OSM (the latter being preferable to me).

-Andrew

otptes...@gmail.com

unread,
Aug 21, 2018, 6:20:47 AM8/21/18
to OpenTripPlanner Users

I have modifyed the source code as you suggested and this seems to have solved my issue, but still there is a slight problem when planning trips between locations which happen to be at a far distance from a nearby stop as this causes the trip planner to return empty results.

Is there a way to change the maximum distance allowed between origin/departure locations and nearby stops ?

Reply all
Reply to author
Forward
0 new messages