Closed karlsander closed 4 years ago
A schedule as computed by computeSchedules
is data derived from the GTFS. It therefore does not correspond 1-to-1 to a GTFS route
(it may). Therefore we can't expose a single route_id as part of a schedule
.
What we could do instead: Add a route_id
field to each item in schedule.trips
, because one trip
has exactly one route
associated.
@karlsander Are you interested in adapting this PR? I'd happily merge it then. 🙂
So, this was a real drive by PR on my part. Sorry about that. I don't work with GTFS much and my memory of what I was even trying to do here is... limited.
I just pushed a commit with the suggested change (i think?) and it seems to work for the code I wrote for it (again, i think? But I think it's a flawed idea there?).
I have no real interest in getting it merged and I'm not qualified to say if its a good idea, so unless you think its very useful, probably close without merging.
I didn't want to put any pressure on you saying i don't want it merged but then also submiting the patch, it was just kind of a fun puzzle that evening, so I'm closing this.
Using this id as a signature (via custom computeSig) seems to work really well for me.
I'm not super familiar with gtfs so its possible that this approach is flawed in a way I'm missing.