HELP - Metro North Static and Realtime ids mismatch

40 views
Skip to first unread message

Dmc522

unread,
Jun 16, 2025, 8:49:00 AMJun 16
to mtadeveloperresources
Hi,

I'm writing a simple app that allows me to pick arrival and departure destination and it provides the next few trips for Metro North Railroad.

I am using both gtfs realtime and static data

The issue is that the IDs i am seeing in the feed updates are a different format then the static data.

My the trip ids from realtime look like this
eg. 2761672

While the trip ids in trips.txt are much longer.
eg. 246084024608405+1302415+1

I did a manual check and 2761672 doesn't exist in my trips.txt
Are the trip ids supposed to match in two data sets.
My understanding is that you are supposed to get all base data from static files and then use RT to augment the data.

Any help would be greatly appreciated


def get_trip_updates(self):
response = requests.get(GTFS_REALTIME_URL)
response.raise_for_status()

feed = gtfs_realtime_pb2.FeedMessage()
feed.ParseFromString(response.content)

updates = {}
for entity in feed.entity:
if not entity.HasField("trip_update"):
continue
trip_id = entity.trip_update.trip.trip_id

Dmc522

unread,
Jun 16, 2025, 7:02:59 PMJun 16
to mtadeveloperresources
The answer was in another thread.

the trip_id in the static data and realtime data mismatch is a known issue.

entry.id = trip.trip_short_name.
Reply all
Reply to author
Forward
0 new messages