-
Notifications
You must be signed in to change notification settings - Fork 184
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] Area Set matching predicates. #483
base: master
Are you sure you want to change the base?
Conversation
gtfs/spec/en/reference.md
Outdated
@@ -477,12 +479,16 @@ To process the cost of a leg: | |||
|
|||
<br/> | |||
|
|||
For area set predicates in `fare_leg_rules.txt` specified below, a leg “travels through an area” if any of the stops or parent stations (if the area is not defined at the stop-level) of the leg; including departure, arrival, and intermediate stops; belongs to the specified area as defined by [stop_areas.txt](#stopareastxt). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the intermediate stops
, it seems they must be stops defined in stop_times rather than "geographical pass-through" stops. Could the current description cause misunderstandings? Would it be clearer to state this explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to add explicit language. Let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Just to confirm:
and intermediate stops as referenced by the trip's stop-time entries; belongs to the specified area as defined by [stop_areas.txt]
This means that entries will be included regardless of their pickup_type
and drop_off_type
values (e.g., value=1 - No pickup/drop_off available). Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I suppose that's correct.
I think we discussed this briefly in the last meeting, yes? I think it's reasonable to make the default the simple case (passes through a stop).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, got it. Just want to confirm if I correctly understand the semantics here (i.e. regardless of the pickup_type and drop_off_type values).
Whilst we are far along in this proposal, I recently had the following thought. It may be overly pedantic (and doesn't come with a proposed solution), but it might be worth discussing. There seems to be a bit of a variation between how eg areas are formed from stops, and how area sets are formed from areas. Stops and areas / Routes and networks
Areas and area setsarea_sets.txt defines the collections and the insertion. It's not clear where any fields that an area set might gain down the line would go. If we view the collection as 'set', then it does partially follow the above scheme, but that will cause issues once we have network sets, and sets.txt would be ambiguous. However having area_sets.txt and area_area_sets.txt doesn't seem sensible. We could find a name for an area set (in the way that we call a 'stop set' an area), possibly 'region' – but may be hard to find a word that would be appropriate in all uses of area sets. (Also would eventually have to find one for the corresponding network and trip_group cases). Or further area set level fields could go in area_set_details.txt. |
It seems reasonable to separate collections and insertions into collections into two files, which is consistent with the existing three cases ( |
Did we talk about this briefly in the Fares v2 meeting last week? Or did I just imagine talking about this? :) Agreed that the naming is awkward here. A couple options:
|
|
||
| Field Name | Type | Presence | Description | | ||
| ------ | ------ | ------ | ------ | | ||
| `area_set_id` | Unique ID | **Required** | Identifies an area set. Must be unique in [area_sets.txt](#area_setstxt). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume an area_set can be a collection that contains multiple areas. A unique ID doesn’t seem suitable for mapping area to area_set?
Last week I mentioned that Hal raised this question, but it seems we didn’t dive into the discussion. :) Currently, all similar files (e.g., Regarding naming, How does this look?
|
Add support for matching "sets" of areas in
fare_leg_rules.txt
per this proposal.