REQUEST FOR INFORMATION: How to get Actual stop crossing time and Current/Next stop on a trip using GTFS-RT

119 views
Skip to first unread message

Harmit Khera

unread,
Jul 18, 2020, 8:21:12 PM7/18/20
to GTFS-realtime
Hi All,

Using the GTFS - RT feeds (Trip updates or Vehicle Positions) How can I get the below:

1) What is the best way to figure the time when the vehicle Actually crossed a  scheduled stop on a trip? 

2) How do I find the next stop on a trip or the current stop if the current stop sequence is not always populated? 

Any help is much appreciated,
Thanks

Stefan de Konink

unread,
Jul 19, 2020, 4:40:03 AM7/19/20
to gtfs-r...@googlegroups.com
On Sunday, July 19, 2020 2:21:12 AM CEST, Harmit Khera wrote:
> 1) What is the best way to figure the time when the vehicle Actually
> crossed a scheduled stop on a trip?

1. Take the shapes of the route from GTFS (or recreate it).
2. Take the vehiclePositions GTFS-RT feed.
3. Project the vehiclePosition on the route (some intelligence would be
required if a route has a loop)
4. By the projection you know the shape distance traveled, which is also
available from the GTFS feed.

> 2) How do I find the next stop on a trip or the current stop if the current
> stop sequence is not always populated?

Load the GTFS feed in parallel and infer the values.

--
Stefan

Sean Barbeau

unread,
Jul 20, 2020, 12:05:29 PM7/20/20
to GTFS-realtime
Message has been deleted

Vivek Rathi

unread,
Aug 10, 2020, 9:13:44 PM8/10/20
to GTFS-realtime
Hi Stefan,

can you expand on point 3 in your comment? or is there any resource you can point to?

Thanks

Sean Barbeau

unread,
Aug 11, 2020, 6:21:23 PM8/11/20
to gtfs-r...@googlegroups.com
Vivek,
You can snap the vehicle position point to the line (from shapes.txt) using GIS libraries like GeoTools:

Sean 


--
You received this message because you are subscribed to a topic in the Google Groups "GTFS-realtime" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gtfs-realtime/dtBvKjvRZmE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gtfs-realtim...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gtfs-realtime/2c7628d6-155b-4b38-a4d2-4ed4f610feb7o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages