Till senaste kommentaren
Detta inlägg är gammalt och kan innehålla inaktuell information.

GTFS identifier continuity between versions

Hello,

I am working on a system which would have to be able to link data across different versions of GTFS Sverige 2 -feed. However, recently I have discovered that it seems like the identifiers of routes and trips might refer to different routes and trips in different versions of the GTFS feed.

For example:

Trip_id and route_id inconsistence problem between MTR Express 20190708 version and 20190701 version:
  • Same trip_id, but refers to completely different routes in these two versions. I know the route is different, because not only route_id, but also actual stops are different. – E.g., trip_id ‘28120000010052’ points to route ‘1812000000024’ in 20190701 version, and route '1812000000007' in 20190708 version.
  • Same route_id, but refers to different sequences of stops in these two versions, so obviously they are different routes. – E.g., route_id '1812000000007' points to a route from "Stockholm Södra station" to "Halmstad Centralstation" in 20190701 version, but points to a route from "Stockholm Centralstation" to "Göteborg Centralstation" in 20190708 version.

route_id confusing issue in the same version:
  • one route_id can refer to totally different sequences of stops, even in the same version. – E.g., route_id "1841000100001" in 20190701 input, can referr to trips from "Ädelstenen Östra Nibble" to "Borgåsund", or from "Surahammar station" to "Virsbo Felingvägen", or from "Borgåsund" to "Ädelstenen Östra Nibble", or from "Kolbäck station" to "Ädelstenen Östra Nibble", or from "Hallstahammar centrum" to "Borgåsund", etc.

Do you think this behaviour is same for all of the operators? Not only for MTR express?

The inconsistence between the identifiers in different versions basically makes it impossible to track the changes for a particular trip across different versions of the GTFS feed.

Do you have any ideas how to track the changes? Or I suppose you don't have any plans to change the functionality of any of the identifiers in GTFS Swerige 2 in near future?

Br,
Konsta

Kommentarer

  • Hej Konsta!

    At this moment the numbers are just randomly generated to link different data rows together. They do not carry any meaning between different versions. You can consider calculating hashes over the important route parameters, in order to generate your own consistent identification method. There are no plans to change this in the future, as this isn't something we can control. This behaviour should be the same for every operator in the GTFS Sverige 2 feed.

    Our GTFS-Regional feed has ids which are more stable, however, this stability is never guaranteed as it is not specified in the GTFS specification.

    Regards,
    Bert
    Bert på Trafiklab
  • Hi,

    Thank you for your quick answer. We'll reconsider our approach to tracking the changes across different versions of GTFS.

    Br,
    Konsta

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post visas aldrig publikt.