You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, there is no way to get station entrances/exits from the API either when planning a trip or directly as part of dedicated queries/subqueries. Adding this information can enable more detailed itineraries with station ingress/egress explicitly called out as well as better glanceable information via map annotations.
Several popular routing solutions use such information to enhance their UIs currently. Below are examples from Google Maps, Apple Maps, and the Transit app, respectively:
Goal / high level use-case
There are 3 key scenarios I think this information would be useful:
For routing directions, being able to explicitly direct a user to an entrance/exit with an annotation on the map if desired.
For routing directions, being able to break up walking directions with explicit entrance/exit steps.
Showing the user a nearby station and all of its entrance/exit points without requiring them to plan a trip. Consider for example an arrival time board that shows nearby stations, departure times, etc. at a glance.
Describe the solution you'd like
There are 2 types of station entrances/exits that can be exposed by OTP:
Those explicitly defined in GTFS data in stops.txt.
I believe exposing the GTFS data will be significantly easier, since its structure is well defined and it is already explicitly associated with parent stations.
However, OSM data could be exposed through the same API, where the main differences would be (1) the object identifier would be an OSM ID instead of a GTFS ID and (2) the metadata would potentially be less rich depending on the OSM region. Below are example queries focusing on the GTFS case for now, but their structure could potentially be reused for OSM data as well.
Entrances/exits as part of a plan query
By splitting itinerary legs on stop entrances/exits, it becomes possible for API consumers to demarcate the act of entering/exiting a station from other steps by inspecting the stop in the to/from subqueries.
As this breaks compatibility with the existing query structure, adding a query variable splitStopEntrancesAndExits could be used to explicitly opt-in to this new behavior.
I believe this is approximately the approach that @flaktack used for implanting stop entrance/exit steps for the Budapest GO Trip Planner, as described in a recent dev meeting.
Another addition to this structure could be to add new stopEntrance and stopExit subqueries which provide the entrance/exit points in such cases. The advantage of doing this would be a more flexible object structure for entrances/exits which could also incorporate OSM entities in addition to GTFS stops.
The best alternative is probably using vector tile layers (as suggested on Gitter and in a recent dev meeting). However, I believe this approach has a few shortcomings:
This will require the usage of a map SDK where custom vector tiling is supported. Such systems may be significantly different in their implementation, requiring custom solutions per vendor.
Depending on the tiling implementation, interactivity and custom sizing of iconography may be limited. For example:
a. Having a larger icon for the relevant entrance of a trip.
b. Tapping on an entrance to get more information about for a specific entrance (accessibility, etc.).
This does not provide a solution to the more granular routing instructions made possible by leg splitting or other comparable query modifications.
Additional context
As mentioned previously, @flaktack has done some work on this for the Budapest GO Trip Planner. It is possible this work could be upstreamed as part of this issue. Below is an example itinerary that calls out when to exit/enter stations:
Is your feature request related to a problem? Please describe.
Currently, there is no way to get station entrances/exits from the API either when planning a trip or directly as part of dedicated queries/subqueries. Adding this information can enable more detailed itineraries with station ingress/egress explicitly called out as well as better glanceable information via map annotations.
Several popular routing solutions use such information to enhance their UIs currently. Below are examples from Google Maps, Apple Maps, and the Transit app, respectively:
Goal / high level use-case
There are 3 key scenarios I think this information would be useful:
Describe the solution you'd like
There are 2 types of station entrances/exits that can be exposed by OTP:
stops.txt
.I believe exposing the GTFS data will be significantly easier, since its structure is well defined and it is already explicitly associated with parent stations.
However, OSM data could be exposed through the same API, where the main differences would be (1) the object identifier would be an OSM ID instead of a GTFS ID and (2) the metadata would potentially be less rich depending on the OSM region. Below are example queries focusing on the GTFS case for now, but their structure could potentially be reused for OSM data as well.
Entrances/exits as part of a
plan
queryBy splitting itinerary legs on stop entrances/exits, it becomes possible for API consumers to demarcate the act of entering/exiting a station from other steps by inspecting the
stop
in theto
/from
subqueries.As this breaks compatibility with the existing query structure, adding a query variable
splitStopEntrancesAndExits
could be used to explicitly opt-in to this new behavior.I believe this is approximately the approach that @flaktack used for implanting stop entrance/exit steps for the Budapest GO Trip Planner, as described in a recent dev meeting.
Another addition to this structure could be to add new
stopEntrance
andstopExit
subqueries which provide the entrance/exit points in such cases. The advantage of doing this would be a more flexible object structure for entrances/exits which could also incorporate OSM entities in addition to GTFS stops.Entrances/exits as part of the
stations
query and new a top-levelentrances
queryEntrances and exits could also be directly returned from a top-level
entrances
query as well as anentrances
subquery of the existingstations
query:stations
subqueryTop-level
entrances
queryDescribe alternatives you've considered
The best alternative is probably using vector tile layers (as suggested on Gitter and in a recent dev meeting). However, I believe this approach has a few shortcomings:
a. Having a larger icon for the relevant entrance of a trip.
b. Tapping on an entrance to get more information about for a specific entrance (accessibility, etc.).
Additional context
I've opened a PR for exposing station entrances via the GraphQL API: Expose station entrances in GraphQL API #6082
There is a recent draft PR that attaches station entrances to walk steps: If configured, add subway station entrances from OSM to walk steps #6076
The text was updated successfully, but these errors were encountered: