amigocloud / modified-tripplanner

A web-based UI for delivering personalized commute information to travelers
Other
2 stars 2 forks source link

Investigate why the cost is always free #25

Closed vchernetsky closed 9 years ago

vchernetsky commented 9 years ago

GTFS seem to have price of the transit data. Perhaps OTP does not provide this info as part of "profile" route calculation?

uploads/7007f713-55d8-4563-95bf-56b97608c4cb/Screen Shot 2015-05-23 at 11.58.42 AM.png

rburhum commented 9 years ago

How does it work in CarFreeAtoZ then?

On Saturday, May 23, 2015, Victor Chernetsky notifications@github.com wrote:

GTFS seem to have price of the transit data. Perhaps OTP does not provide this info as part of "profile" route calculation?

[image: uploads/7007f713-55d8-4563-95bf-56b97608c4cb/Screen Shot 2015-05-23 at 11.58.42 AM.png] https://camo.githubusercontent.com/59e4926a3f81492d4c091284fcfdfe1a625ddc73/68747470733a2f2f73332d75732d776573742d322e616d617a6f6e6177732e636f6d2f70726f642e6875626f6172642e636f6d2f75706c6f61647325324637303037663731332d353564382d343536332d393562662d35366239373630386334636225324653637265656e2b53686f742b323031352d30352d32332b61742b31312e35382e34322b414d2e706e67

— Reply to this email directly or view it on GitHub https://github.com/amigocloud/modeify/issues/25.

Ragi Burhum

+1 (415) 935-1447 ragi@amigocloud.com linkedin.com/in/rburhum

vchernetsky commented 9 years ago

Like this: CarFreeAtoZ OTP /profile response- "fares": [ { "type": "METRO_RAIL", "low": 2.3, "peak": 2.9, "senior": 1.45, "transferReduction": false } ]

VTA2 OTP profile responce- "fares": [ null ]

vchernetsky commented 9 years ago

OTP does not use GTFS fares. In fact Washington DC and VA GTFS don't have fare_attributes.txt files in them at all.

OTP uses these hard coded csv files to have fare prices: src/main/resources/org/opentripplanner/profile/fares/

See this: https://github.com/opentripplanner/OpenTripPlanner/blob/ec84db804207f428a4a94536087d2ec6a525e6f8/src/main/java/org/opentripplanner/profile/DCFareCalculator.java

vchernetsky commented 9 years ago

But the original OTP /plan API seems to use GTFS fare info:

This is the snip of the reply of this query:

http://vta.amigocloud.com/route/otp/routers/default/plan?callback=jQuery1910489395187003538_1432493171817&fromPlace=37.32430451813815%2C-121.89331054687499&toPlace=37.55981972178116%2C-122.31353759765624&time=11%3A46am&date=05-24-2015&mode=TRANSIT%2CWALK&maxWalkDistance=750&arriveBy=false&showIntermediateStops=false&_=1432493171822

"fare": { "fare": { "regular": { "currency": { "symbol": "$", "currency": "USD", "currencyCode": "USD", "defaultFractionDigits": 2 }, "cents": 200 } }

It becomes more and more obvious that Conveyal just did a quick hack of OTP. We need to port it to use original /plan API.