Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTFS Fares V2 Leg rules amount #132

Open
Abramovick opened this issue Aug 24, 2022 · 4 comments
Open

GTFS Fares V2 Leg rules amount #132

Abramovick opened this issue Aug 24, 2022 · 4 comments

Comments

@Abramovick
Copy link

Abramovick commented Aug 24, 2022

Hey man,
Thanks for your quick response and sorting out GTFS Fares V2 for me.
I'm facing 1 issue when trying to get the results of fare_leg_rules, it doesn't return any amount or min_amount or max_amount.

When i run await getFareLegRules({});
I get back something like this;

{
      leg_group_id: 'l012',
      network_id: 'SARGN247:SER247',
      from_area_id: 'a12',
      to_area_id: 'a13',
      fare_product_id: '1'
}

Without amount, even though it's in the fare_leg_rules.txt file.
I tried to add the fields as the 2nd argument to getFareLegRules, something like this await getFareLegRules({}, ['amount']); but there's still nothing. I even tried to run the raw SQL query. But is still don't get those fields.

@brendannee
Copy link
Member

Thanks for the detailed note.

When setting up the schema for fare_leg_rules.txt, I only implemented the fields defined in the Fares v2 adopted as part of the GTFS spec on https://gtfs.org/schedule/reference/#fare_leg_rulestxt - it looks like "amount" is not included.

Can you share your GTFS file with me so I can see what fields are in each field?

@Abramovick
Copy link
Author

Abramovick commented Aug 24, 2022

I had implemented it as per this document https://docs.google.com/document/d/19j-f-wZ5C_kYXmkLBye1g42U-kvfSVgYLkkG5oyBauY/edit#heading=h.xcn48t8xbmxb. This is the latest updated draft as far as i know.
Without adding an amount on a leg on fare_leg_rules, then there's no way to get the price of the leg...
PS: I haven't yet added the actual prices on my GTFS feed. I'm actually just testing GTFS Fares V2 with some dummy data based on that document. Everything works so far, only that i don't have a way to get the price of a leg because the amount is not being returned.

@brendannee
Copy link
Member

It looks like a subset of fares v2 was accepted into the GTFS spec earlier this year, but not all files/fields. Still, I'll work on adding support for all of the fields as identified in the google doc and ping you when they are added.

If you know of any agencies using all of these fields, let me know so I can try it out.

@Abramovick
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants