Skip to content

🐛📄 – Is vehicle_locations.pattern_id supposed to be the planned/scheduled pattern ID or an observed pattern ID? How does it map to GTFS? #254

@lauriemerrell

Description

@lauriemerrell

Describe the problem

This is a little theoretical but I was working on mapping GTFS RT vehicle positions to TIDES vehicle locations and I realized that there is not technically a value for pattern_id in GTFS RT (the closest is presumably route_id)

But -- this made me realize that I am not 100% sure of the intent of pattern ID in TIDES vehicle locations. Do we think it's supposed to be the scheduled pattern ID (determined in advance) or is it supposed to be inferred based on observed behavior, or perhaps a mix of both?

I'm specifically wondering about the following cases:

  • Trip is a "normal" scheduled trip but in practice it takes a detour -- should pattern ID be the scheduled pattern ID or the observed pattern ID?
  • Trip is observed but not scheduled. Should pattern ID be null (because not scheduled) or inferred?

The docs for this field reference GTFS shape_id which feels not right -- shape ID does not determine a stop pattern, shape ID is for display purposes.

Possible Solutions

Clarify intent of this field:

  • GTFS mapping: The concept of a distinct stop pattern ID does not technically exist in GTFS schedule or in GTFS RT (vehicle positions) -- perhaps consider just saying that this field does not map to GTFS and/or consider adding route_id to vehicle locations as optional (because currently if the source data has this data -- like GTFS RT vehicle positions does -- there technically isn't a place to put it in TIDES)
  • Observed vs. scheduled: Clarify whether this is supposed to be the planned/scheduled pattern ID for this trip or if it as post-hoc observed pattern ID (other fields in this table have scheduled vs. observed designations)

Additional context

Mapping from GTFS RT is probably more relevant for demo or example use cases, and I don't personally have a ton of experience with what identifier (route vs. pattern) would be more common or expected in an AVL stream. So perhaps the answers are clearer for people with more experience looking at raw AVL data

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working – in spec or code📄 specPertains to the specification itself📙 docsElaborating or updating the documentation – inline or otherwise

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions