ITSLeeds / UK2GTFS

Convert UK transport data (TransXchange / ATOC CIF) to GTFS format in R
https://itsleeds.github.io/UK2GTFS/
GNU General Public License v3.0
37 stars 13 forks source link

TxC JourneyPatternTimingLink > From > WaitTime isn't accounted for #33

Closed stupidpupil closed 2 years ago

stupidpupil commented 3 years ago

As far as I can see, the TransXchange code doesn't take account of WaitTime described in the From part of a JourneyPatternTimingLink.

Attached is an example of a service where this is significant: StagecoachX3-Cardiff-Hereford9_TXC_2021707-0906_SCAX003.xml.zip (This service is from the TNDS and is made available here under the OGLv3.)

The consensus seems to be that this service, for example, departs Abergavenny (Bus Stop 4) at 1120 and arrives at Cardiff (Royal Hotel) at 1301: BusTimes.org

Robinlovelace commented 3 years ago

Very interesting to me, not least because the trip described goes near where I'm from. FYI @mem48 is on annual leave this week so may not response for a while to this, and on #32 .

stupidpupil commented 3 years ago

Understood re @mem48's leave!

Given your origin, you might be interested in this: https://stupidpupil.github.io/wales_ish_otp_graph/ ! (Was going to write an enthusiastic thank you to ITS Leeds at some point soon, for UK2GTFS, which it's entirely built on top of. )

Might have go at this myself later this week.

mem48 commented 3 years ago

I am on leave but this looks interesting so will definitely look at when I get back

@stupidpupil have you seen https://github.com/ropensci/opentripplanner might be useful.

stupidpupil commented 3 years ago

I have! (At some point I need to do a write-up for colleagues on what they can use with OpenTripPlanner in R and other tools. A slight stumbling block is that I've been sticking with OTPv2 for various reasons.)

Have had a go at addressing this issue here: https://github.com/stupidpupil/UK2GTFS/commit/18225095ed975cb404335dcc7f6a14ab969b68c5

Not yet convinced enough to submit a pull request - will do some testing first.

mem48 commented 3 years ago

The Github version has support for OTP 2.0 plus a bunch of new OPT 1.5 features. I haven't had a chance to check exhaustively prior to submitting to CRAN but they basically all work, but some are poorly documented.

mem48 commented 3 years ago

There are few hints on how to get OTP2 support working https://docs.ropensci.org/opentripplanner/articles/OTPv2.html

mem48 commented 2 years ago

I've committed a fix based on your solution and added the example file to the automated tests. The results I go where slightly different from the BusTimes.org ones but I'm now compared different versions of the timetable. The new code does at least include the From WaitTimes so a step in the right direction.

mem48 commented 2 years ago

It's past the automated checks, so I think I'm now caught up with all the bugs you've found. Thanks for spotting them.