[Open-transport] Hafas Raw Data Format to GTFS conversion (Zürich)

Stefan Wehrmeyer stefan.wehrmeyer at okfn.org
Mon May 27 13:30:37 UTC 2013


Hi Thomas, Brian, list,

the format is not binary, it's a latin1 fixed column text format. It has "binary" portions as ascii hex strings. The specs are pretty detailed (read long) but seem to cover everything.

Be aware that the names of the files in Zürich dataset differ from the spec I linked to below.
The important file is ZUGDAT (called FPLAN in the specs).

You can find the data here:
https://dl.dropboxusercontent.com/u/3250791/5_TU_CH_OeV_Sammlung_CH_2013_130503_0459.zip
(~80 MB)

If one of you decides to start building a conversion tool I would encourage you to build it as Open Source and in the open because I'd love to test and help out!

Cheers
Stefan


On 27.05.2013, at 15:18 , Brian Ferris <bdferris at google.com> wrote:

> I'd also be interested in adding a converter to the OneBusAway converter suite.  Is there a public dump of the Hafas data someplace to play with?
> 
> 
> On Mon, May 27, 2013 at 2:51 PM, Thomas <thomaskoch at gmail.com> wrote:
> I'm pretty busy this week, but i can look into it. 
> I've build multiple  GTFS converters for multiple formats, this format looks somewhat similar to IFF but seems to be binary?. OpenPlanB worked on converting data from the HAFAS CD's but never completed a GTFS converter.
> 
> In any case the startpoint is to dump the data into tables and then build a series of SQL query's to convert it to GTFS schema.
> 
> Kind regards,
> Thomas Koch
> 
> 
> On Mon, May 27, 2013 at 2:34 PM, Stefan Wehrmeyer <stefan.wehrmeyer at okfn.org> wrote:
> Dear list,
> 
> I was recently approached by someone from Zürich interested in GTFS data.
> It turns out the Hafas Raw Data Format is available but no GTFS data and I couldn't find a conversion tool.
> 
> The Hafas raw format is a fixed-column text format as described here:
> http://labs.rejseplanen.dk/files/Data/HafasFormat.pdf
> 
> It's not that easy to parse and building a converter to GTFS is likely not difficult but time consuming.
> 
> I found a parser written in C++ that is embedded in another huge project, but it can be a place to start:
> https://extranet.rcsmobility.com/svn/synthese3/trunk/src/61_data_exchange/HafasFileFormat.cpp
> (However, it may not be the best place to start)
> 
> If anyone knows a tool for conversion, please let me know.
> If you are interested in writing such a tool, I'm glad to help, but it's not something I can put a lot of effort into right now.
> 
> Cheers
> Stefan
> _______________________________________________
> open-transport mailing list
> open-transport at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/open-transport
> Unsubscribe: http://lists.okfn.org/mailman/options/open-transport
> 
> 
> _______________________________________________
> open-transport mailing list
> open-transport at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/open-transport
> Unsubscribe: http://lists.okfn.org/mailman/options/open-transport
> 
> 





More information about the open-transport mailing list