From af0f468b72d9a95505315d0c289612171563e851 Mon Sep 17 00:00:00 2001 From: Weston Shippy <57922264+westontrillium@users.noreply.github.com> Date: Tue, 7 May 2024 19:59:35 -0700 Subject: [PATCH] Clarify stops.zone_id conditional requirement for route-based fare_rules (#432) * Clarify stops.zone_id conditional requirement for route-based fare_rules * Change stops.zone_id to optional --- gtfs/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 3b990cc8..ab7eff4f 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -207,7 +207,7 @@ Primary key (`stop_id`) | `stop_desc` | Text | Optional | Description of the location that provides useful, quality information. Should not be a duplicate of `stop_name`.| | `stop_lat` | Latitude | **Conditionally Required** | Latitude of the location.

For stops/platforms (`location_type=0`) and boarding area (`location_type=4`), the coordinates must be the ones of the bus pole — if exists — and otherwise of where the travelers are boarding the vehicle (on the sidewalk or the platform, and not on the roadway or the track where the vehicle stops).

Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`).| | `stop_lon` | Longitude | **Conditionally Required** | Longitude of the location.

For stops/platforms (`location_type=0`) and boarding area (`location_type=4`), the coordinates must be the ones of the bus pole — if exists — and otherwise of where the travelers are boarding the vehicle (on the sidewalk or the platform, and not on the roadway or the track where the vehicle stops).

Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`). | -| `zone_id` | ID | **Conditionally Required** | Identifies the fare zone for a stop. If this record represents a station or station entrance, the `zone_id` is ignored.

Conditionally Required:
- **Required** if providing fare information using [fare_rules.txt](#fare_rulestxt)
- Optional otherwise.| +| `zone_id` | ID | Optional | Identifies the fare zone for a stop. If this record represents a station or station entrance, the `zone_id` is ignored.| | `stop_url` | URL | Optional | URL of a web page about the location. This should be different from the `agency.agency_url` and the `routes.route_url` field values. | | `location_type` | Enum | Optional | Location type. Valid options are:

`0` (or blank) - **Stop** (or **Platform**). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a `parent_station`.
`1` - **Station**. A physical structure or area that contains one or more platform.
`2` - **Entrance/Exit**. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it may be linked by pathways to both, but the data provider must pick one of them as parent.
`3` - **Generic Node**. A location within a station, not matching any other `location_type`, that may be used to link together pathways define in [pathways.txt](#pathwaystxt).
`4` - **Boarding Area**. A specific location on a platform, where passengers can board and/or alight vehicles.| | `parent_station` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Defines hierarchy between the different locations defined in [stops.txt](#stopstxt). It contains the ID of the parent location, as followed:

- **Stop/platform** (`location_type=0`): the `parent_station` field contains the ID of a station.
- **Station** (`location_type=1`): this field must be empty.
- **Entrance/exit** (`location_type=2`) or **generic node** (`location_type=3`): the `parent_station` field contains the ID of a station (`location_type=1`)
- **Boarding Area** (`location_type=4`): the `parent_station` field contains ID of a platform.

Conditionally Required:
- **Required** for locations which are entrances (`location_type=2`), generic nodes (`location_type=3`) or boarding areas (`location_type=4`).
- Optional for stops/platforms (`location_type=0`).
- Forbidden for stations (`location_type=1`).|