-
Notifications
You must be signed in to change notification settings - Fork 214
Description
This issue relates to the GTFS-Flex proposal, and is opened following a series of roundtable discussion to resolve the outstanding issues with the proposal. These discussions were hosted by MobilityData and attended by various stakeholders within the GTFS community.
You can find the GTFS-Flex proposal here: https://github.com/MobilityData/gtfs-flex/blob/master/spec/reference.md
The file locations.geojson is based on the geoJSON format defined by RFC 7946.
In the current GTFS-Flex proposal, the file locations.geojson is structured as follows:
- Type (always set to FeatureCollection)
- Features
- type (Always set to Feature)
- id (Unique ID to describe the location)
- properties (These properties match how stops are described in stops.txt)
- stop_name (Text name)
- stop_desc (Text description)
- zone_id (In case of Fares v1)
- stop_url (URL)
- Geometry
- Type (Options are: Point, MultiPoint, Linestring, MutiLineString, Polygon, and MultiPolygon)
- coordinates (Array of coordinates)
It is possible to simplify locations.geojson and to tailor it to GTFS-Flex while remaining compliant with RFC 7946. We propose the following changes:
- Make the file
locations.geojsonlighter- Remove
propertiesand all fields that fall under it (those will be described instops.txt) - Remove
Point,MultiPoint,Linestring, andMutiLineStringfrom the list of options forGeometry.Typesince there is no need to define points or lines inlocations.geojson
- Remove
- Use the file
locations.geojsonto create the zone (ID and geometry) - Use the file
stops.txtto associate attributes to the zone (stop_name,stop_desc,zone_id,stop_url, and others)
This means that zones are created in locations.geojson, and then listed with all other stops in stops.txt to associate attributes to the zone (some fields such as stops.stop_lat and stops.stop_lon will be forbidden when a record in stops.txt corresponds to a zone)
The advantages to doing this are:
- Stops and zones will be listed in the same file instead of multiple files
- Changes to the spec that relate to the attributes of stops and zones will only affect
stops.txt(no need to maintain field parity withlocations.geojson)
With these changes, the file locations.geojson will be structured as follows:
- Type (always set to FeatureCollection)
- Features
- type (Always set to Feature)
- id (Unique ID to describe the location)
- Geometry
- Type (Polygon, MultiPolygon)
- coordinates (array of coordinates)
If there is a general consensus on proceeding with this option, we can post a proposal of how to modify the files and fields in stops.txt (and other files like transfers.txt, pathways.txt, levels.txt, and fare_leg_rules.txt) to accommodate GeoJSON locations.