TransXchange converter

980 views
Skip to first unread message

Mark Goodge

unread,
Apr 28, 2016, 4:52:34 AM4/28/16
to transit-d...@googlegroups.com
Does anyone have any suggestions for software, ideally running on Linux,
that can do mass conversions of TransXchange format xml files into
something a bit more useful?

I'm aware of TransXchange:publisher, but that is primarily a Windows
package (in theory it ought to run on Linux, being Java, but I haven't
been able to make it work successfully) and is intended mainly for
one-shot manual conversions of single files. I want something that can
take the Traveline TNDS and convert it in bulk - either directly into
timetable files, or into GTFS format (which is a lot easier to manipulate).

I'd prefer something open source, but I'll be willing to pay for
commercial softwre if the price is reasonable and there are no licensing
issues with the data that it produces. I'm not interested in anything
that's SaaS and/or asserts any proprietory rights in the generated output.

(I know I could write my own, but I'd rather not have to reinvent this
particular wheel if I can avoid it.)

Any suggestions?

Mark

Joa

unread,
Apr 29, 2016, 12:41:27 AM4/29/16
to Transit Developers
Have a look at
https://github.com/jpf18/TransXChange2GTFS
The converter accepts single TransXChange XML files as well as zip archives of TransXChange files.
You need to provide a few references to fill in content that the TransXChange files do not provide:
Agency URL, timezone, default route type, and a copy of the NaPTAN Stops.csv file.
Installation instructions here (at the old Google Code project location): https://code.google.com/archive/p/googletransitdatafeed/wikis/GTDF_Installation.wiki
Hope this helps.
JP

Marcus Young

unread,
Apr 29, 2016, 4:17:37 AM4/29/16
to Transit Developers
Hi

Unfortunately the TransXchange2GTFS converter does not work with current TransXchange data. It is pretty much a dead project and has not been updated since 2012. Nobody seems to be interested anymore as this is purely a UK issue. The other country that uses TransXchange, Australia, also supply their open data in GTFS. But if you have the skills to work on that project and get it all working again that would be where to start. The reason that there is no other open source alternative is I think because the conversion is very complex, or so people who have had a go tell me. If it was fairly straightforward there would be the tools out there.

I have used used Visography TRACC to do the conversion, but this is for academic research use. Also the conversion isn't entirely without problems. For example, it seems to ignore calendar_dates.

Marcus

Marcus Young

unread,
Apr 29, 2016, 4:28:41 AM4/29/16
to Transit Developers
When I say TRACC ignores calendar_dates I mean it doesn't generate this file and the information that needs to be in it for school day services and stuff like that.

Sean Barbeau

unread,
Apr 29, 2016, 9:24:54 AM4/29/16
to Transit Developers
See also https://github.com/Transporter-Project/transxchange-to-gtfs.

I googled "TransXchange to gtfs" and a number of hits came back.

Sean

Marcus Young

unread,
Apr 29, 2016, 9:40:48 AM4/29/16
to Transit Developers

But as the developer states: "this is a rather crude implementation ... and needs a lot of work". It's not something I'd necessarily trust.  But it may be another good starting point for another developer to take further. I've spent a lot of time looking for something suitable out there and failed. But I'm not a developer, so things that I discounted may be suitable for others to take on.

Mark Goodge

unread,
Apr 29, 2016, 2:54:37 PM4/29/16
to transit-d...@googlegroups.com
On 29/04/2016 14:40, Marcus Young wrote:
>
> But as the developer states: "this is a rather crude implementation ...
> and needs /a lot/ of work". It's not something I'd necessarily trust.
> But it may be another good starting point for another developer to take
> further. I've spent a lot of time looking for something suitable out
> there and failed. But I'm not a developer, so things that I discounted
> may be suitable for others to take on.

Yes, I've found plenty of half-baked or obsolete open source projects.
But all of them are missing significant functionality, or lack
documentation, or simply don't work. Which is why I'd be prepared to pay
for a commercial solution, if one exists and is available at a
reasonable price.

Mark

Joris Wu

unread,
Apr 30, 2016, 2:45:10 AM4/30/16
to Transit Developers
You may be able to attract a commercial solution if you give a ballpark figure for your budget and timeframe.

Joris

Joa

unread,
Apr 30, 2016, 12:55:49 PM4/30/16
to Transit Developers
Correct, the way things have developed over the years, GTFS should be considered the industry accepted standard to publicly share static transit data, and the UK seems to be the last "holdout" of exclusively publishing in TransXChange. It's a lot of data though.
I can work on the OSS converter (https://github.com/jpf18/TransXChange2GTFS), I whipped up the code in the first place. It goes all the way, with consideration of Bank Holidays and all.

Truth be told, I lost interest verifying that the converter was running UK data after a year+ of no changes needed. Sometimes a problem was brought up, but it could always be traced back to some data related issue. As an example. the TransXChange content coming in wouldn't validate using the DfT published converter.
-> Does the data in question validate? Publisher/validator tool here: https://www.gov.uk/government/publications/transxchange-publisher
If that's the case, the converter might need some catching up, but given the changes from TransXChamge 2.1 on forward, my guesstimate is that it shouldn't be terribly complicated.
And yes, the documentation hasn't fared so well following the shutdown of Google Code, where the converter was originally hosted and maintained. This part certainly would deserve some brushing up as well.
JP

Marcus Young

unread,
Apr 30, 2016, 1:52:58 PM4/30/16
to Transit Developers
Hi Joa

I was trying with the Traveline data for Wales. I checked some individual XML files with the converter. The majority caused the converter to abort. One or two files it converted ok. All the files passed validation with Publisher.

Marcus

Joa

unread,
May 14, 2016, 11:08:45 AM5/14/16
to Transit Developers
A couple weeks have gone by since I requested FTP access to the TransXChange data. Haven't heard back, cannot log on.
-> Anybody in this group know which buttons to push to move this forward?
JP
Reply all
Reply to author
Forward
0 new messages