You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop times > 23:59:59 unsearchable after midnight #23
Nice catch. Just looking quickly, I think this could be resolved by simple changing the *_time members of gtfs::stop_time into resolved DateTimes.
The comparisons in the query functions are converting them into DateTimes anyway, so I don't see much of a performance hit. In fact, this could actually be a massive storage improvement (12 bytes per DateTime vs 17 bytes per string representation; 400k stop times would mean megabytes of RAM being saved, plus the indices could be optimized).
Activity
faultyserver commentedon Jul 28, 2017
Nice catch. Just looking quickly, I think this could be resolved by simple changing the
*_timemembers ofgtfs::stop_timeinto resolvedDateTimes.The comparisons in the query functions are converting them into
DateTimes anyway, so I don't see much of a performance hit. In fact, this could actually be a massive storage improvement (12 bytes perDateTimevs 17 bytes per string representation; 400k stop times would mean megabytes of RAM being saved, plus the indices could be optimized).elliottwilliams commentedon Jul 28, 2017
The issue is that stop times don't actually have associated dates, they're based on the calendar date a trip is active.
faultyserver commentedon Jul 28, 2017
Right. Clearly I've been away from this for too long.
A naive solution (sans maybe trans-atlantic aquatic transit support) could be to start the date iteration 2-3 days before the given start date.
A less naive solution might iterate the stop times within the bounds of the query on the index and determine how far back the date needs to go.
I can't think of a better way that wouldn't at least double memory or run time.