Sadless74 / googletransitdatafeed

Automatically exported from code.google.com/p/googletransitdatafeed
0 stars 0 forks source link

Warn when two trips in the same block have overlapping stop time intervals #230

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've run into a couple of problems handling some feeds that use block_id fields 
to group trips into 
continuous "blocks" of service.  Consider two trips with the same block_id.  
We'd consider it an error 
if these two trips had overlapping StopTimes.  That is to say, if each trip has 
a StopTime that is less 
than some StopTime in the other trip, we'd call that an error.  If a block_id 
defines a continuous run 
of trips that are essentially the same transit vehicle, there must be a strict 
ordering of the trips 
because the vehicle can't go back in time to complete a trip in the block. 

For more discussion, see:

http://groups.google.com/group/transit-developers/browse_thread/thread/605660845
da45107

Find attached a patch that updates feedvalidator/transitfeed to add warnings 
when two trips with 
overlapping stop time intervals in the same block are detected.

Original issue reported on code.google.com by bdfer...@gmail.com on 25 Mar 2010 at 8:17

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for addressing this problem! Before we merge your code please affirm 
that 
you are releasing it under the same terms as the transitfeed package. For more 
details 
see http://code.google.com/p/googletransitdatafeed/wiki/CodeReview

Then you can either let go of it or make some changes during a code review. 
From a 
glance it looks like the right idea. My only big concern is the performance 
impact of 
calling trip.GetStopTimes on every trip with a block_id. The -p command line 
flag may 
help you decide if it is really a problem.

Original comment by tom.brow...@gmail.com on 26 Mar 2010 at 7:40

GoogleCodeExporter commented 9 years ago
I so affirm that I am releasing said patch under the terms of the transitfeed 
package.

I'm hoping that the performance impact of the check won't be any different than 
the ValidateTrips() call that gets 
made in the same validation pass.  ValidateTrips() does a similar loop over all 
trips, calling trip.GetStopTimes().  
Maybe I'm misinterpreting?

Either way, I will try to find a linux machine to run the performance check on.

Original comment by bdfer...@gmail.com on 26 Mar 2010 at 7:46