Brief Description
The HAFAS raw data format (HRDF) is a proprietary timetable data format (more on this here: HAFAS Rohdaten Format (HRDF)).
On-demand services are those that are only carried out when required (more on this here: FACHKONZEPT ON-DEMAND-VERKEHR (v. 2.1 – in German)).
Access the Data
Technical Description
The underlying data model is the same as for the HAFAS Rohdaten Format (HRDF), but the contents of the respective files differ in order to map on-demand traffic.
The following diagram shows an overview of the affected files, the content displayed there and their connections.

The following sections roughly describe each individual file of the HRDF model including examples from the HRDF export (for more detailed information, see the RV and HRDF documentation).
FPLAN
*T-Line
Each on-demand service or journey is introduced with a *T line. There is one entry for each combination of ‘Service area’x’Operating time’x’Connection start’ (connections are described below). These journeys are imprecise, i.e. only one time window and one clock rate are specified.
They include:
- The journey number
- Administration (currently always ‘AST___’ as placeholder)
- Journey time in minutes
- Clock frequency in seconds (spacing between two journeys)
Example: *T 000001 AST___ 0240 0060
This journey is carried out over a period of 4 hours, every minute
*A VE-Line
These lines indicate the service days for a journey
They include:
- The service day number, i.e. a reference to an entry in the BITFELD
Example: *A VE 000114
This journey runs on the days which are coded with index 000114 in the BITFELD entry.
*G-Line
these lines define the means of transport/category
They include:
- The means of transport or category (currently always ‘TEL’ as placeholder – see ZUGART)
Example: *G TEL
This journey is made by a ‘TEL’ (on-demand bus).
*A-Line
These lines describe the attributes of the journey, i.e. additional relevant information/properties detailed in the ATTRIBUT.
They include:
- The attribute code (currently always ‘ZZ’ as placeholder)
Example: *A ZZ
This journey has properties that are encoded in the ATTRIBUT entry with the code ZZ.
*I-Line
Dthese lines describe additional information for the journey which is detailed in INFOTEXT.
They include:
- The info text code (currently always ‘ZZ’ as placeholder)
- The information text number
Example: *I ZZ 900000000
This journey has additional information which must be taken into account and which is described in the INFOTEXT entry with the number 900000000.
Connections
Finally, a pair of start and end points are specified, which contain the start time of the service. These can be found in the BAHNHOF file. In the HRDF documentation, they are called ‘virtual stops’. They are fake constructs that emulate the locations in order to be able to act as the start and end of an algorithm. It is important that the entries are always only created for the start codes (i.e. SSI, SSS, SSD, see below).
They include:
- The stop code
- The type of stop (see below)
Specifically, the stop type (S/S*) Abbreviation is broken down as follows
SS = Start station
SD = Station Destination
SSI = Intra-region start station
SDI = Station Destination Intra-region
SSS = Station Start Supply
SDS = Station Destination Supply
SSD = Station Start Demand
SDD = Station Destination Demand
Example: 9500000 SSI 00700 … 9500001 SDI 00700
This journey starts in 9500000 at 07:00 and arrives in 9500001 at 07:00.
However, as I said, this is a ‘pseudo’ journey; in order to arrive at the ‘real’ end of the service time, the duration of the journey described in the *T line must be taken into account.
*F 03 1 % Dateiformat
% Rufbus Vaudt-Waadt SSI
% 7-11 Uhr, Sa
% Neue Fahrt mit Nr. *1. Verwaltung AST*. Für 4 Std. Im Minutentakt.
*T 000001 AST___ 0240 0060
% Verkehrstagenummer (Bitstring mit 1 wo Sa für 365 T)
*A VE 000114
% Verkehrsmittel TEL (in zugart datei)
*G TEL
% Verweis auf Attributcode ZZ (in attribut datei)
*A ZZ
% Verweis auf Infotexte 9*0 (in infotext datei)
*I ZZ 900000000
*I ZZ 900000001
*I ZZ 900000002
*I ZZ 900000003
*I ZZ 900000004
% VH 95*0 dient als startpunkt für fahrten in region
9500000 SSI 00700
% VH 95*1 dient als endpunkt für fahrten in region
9500001 SDI 00700
[...Rufbus Vaudt-Waadt SSS, Rufbus Vaudt-Waadt SSD ...]
% Rufbus Vaudt-Waadt SSI
% 9:00-12:00 Uhr, So
*T 000007 AST___ 0180 0060
*A VE 000177
*G TEL
*A ZZ
*I ZZ 900000000
*I ZZ 900000001
*I ZZ 900000002
*I ZZ 900000003
*I ZZ 900000004
9500000 SSI 00900
9500001 SDI 00900
REGION
*R-Line
Each on-demand service area or region is introduced with a *R line.
They include:
- The number of the region
- The name of the region
Example: *R 00000001 Call bus Appenzell
The region 00000001 has the name ‘Rufsbus Appenzell’
*C-Line
The category of a region.
They include:
- The category number (always ‘0,’ as it is representative of on-demand transport)
- The subcategory number (optional ‘1,’ for ‘pure’ regions without station lists)
Example: *C 0
The region has the category ‘for on-demand transport’.
*P-Line
The polygon of the region, which can be additive, subtractive, or exclusive. The additive polygons are added, the subtractive polygons are subtracted from the additive polygons. For example, you can create a polgyon with a ‘hole’. The exclusive polygons describe areas for which, if start and/or finish are within, are blocked.
They include:
- + for an additive polygon
- – for a subtractive polygon
- x for an exclusive polygon (no start and no destination)
- y for an exclusive polygon ‘no start only’
- z for an exclusive polygon ‘only no target’
Example: *P +
The region can act as the start/finish for all trips in this polygon, which you define with the following coordinates.
*S-Line+ *I-Line+ *B-Line
The following list of points is assigned to the region. The list usually consists of all ‘pseudo’ points (see *T line and connections). *S indicates the type of points, *I type of routing, *B the possible start and end points.
*S includes:
- The appropriate *S line (see *T line and connections)
*I includes:
- IA = straight line routing
- IS = Road routing
- IN = Time-limited routing
*B includes:
- BA = from/to address
- BS = from/to AS/AC Stops
- BAS = BA+BS
Example: *SSI, *IS, *BAS or *SDI, *IS, *BAS
The specified points can serve as starting points within the region for road routing and both from the address and from the stop or, in the second example, as end points within the region, with otherwise identical framework conditions.
*AS-Line
List of stops served by on-demand services. Example for on-demand corridor services.
They contain the *AS line followed by a list of stop numbers.
Example: *AS
The following stops may be served by the on-demand bus.
*AC-Line
List of stops that can act as a transfer between on-demand and public transport services.
They contain the *AC line followed by a list of stop numbers.
Example: *AC
At the subsequent stops, you may switch between the on-demand service and the public transport service. So-called feeder/feeder stops for public transport.
*F 45 1 % Dateiformat
*R 00000001 Rufbus Appenzell % Region mit Nr. *1 und Namen ‘Rufbus Appenzell’
*C 0 % Kategorie Bedarfsverkehr
*P + % Additives Polygon mit folgenden Koordinaten
9.3890941 47.3906506
9.3907571 47.3888783
[…]
*SSI % Start HS für Verbind. Innerhalb Region
*IS % Strassenrouting
*BAS % Von/nach Adresse in Region oder Rufbus-HS
9500006 % Rufbus Appenzell SSI % Diese Station kann alles oben def. sein
*SDI % End HS für Verbind. Innerhalb Region
*IS % Strassenrouting
*BAS % Von/nach Adresse in Region oder Rufbus-HS
9500007 % Rufbus Appenzell SDI % Diese Station kann alles oben def. sein
[…]
*AS % HS die in Region angefahren werden dürfen
8506260 % Weissbad, Bahnhof
8574054 % Appenzell, Mettlenbrücke
[…]
*AC % HS die als Übergang zu VH genutzt werden können
% 8574067 % Teufen AR, Speicherstrasse
8506260 % Weissbad, Bahnhof
8574054 % Appenzell, Mettlenbrücke
[…]
*R 00000002 Rufbus Vaudt-Waadt % nächste Reion...
*C 0
*P +
6.7401062 46.8948138
BAHNHOF
Contains a list of the ‘virtual stops’ (see also description of FPLAN). These have no real coordinates (see BFKOORD).
Note: in future, we expect that collection points, i.e. locations that are used operationally by on-demand providers, will also be recorded here. For example, ‘Next to the XYZ discotheque’. These do not meet the requirements of a ‘real’ public transport stop.
It includes:
- The number of the stop (virtual stop or at some point also collection point)
- The stop name (virtual stop or at some point also collection point)
Example: 9500000 Vaud-Vaud SSI on-demand bus
The ‘pseudo’ stop 9500000 is called ‘Vaud-Waadt SSI on-call bus’.
*F 01 1 % Dateiformat
9500000 Rufbus Vaud-Waadt SSI % start in der region
9500001 Rufbus Vaud-Waadt SDI % destination in der region
9500002 Rufbus Vaud-Waadt SSS % zubringer von start SA->SSS->SDS->UH
9500003 Rufbus Vaud-Waadt SDS % zubringer von ziel SA->SSS->SDS->UH
9500004 Rufbus Vaud-Waadt SSD % abbringer von umstieghs. UH->SSD->SDD->ZA
9500005 Rufbus Vaud-Waadt SDD % zubringer von umstieghs.
9500006 Rufbus Appenzell SSI
9500007 Rufbus Appenzell SDI
9500008 Rufbus Appenzell SSS
9500009 Rufbus Appenzell SDS
9500010 Rufbus Appenzell SSD
9500011 Rufbus Appenzell SDD
BFKOORD
Contains the list of ‘virtual stops’ (see also description of FPLAN). Since they are not ‘real,’ you can assign them any coordinate, but the file is not optional, so a value is required in each case.
Note: as with BAHNHOF, we would provide the collection points with appropriate coordinates.
It includes:
- Stop number
- X-coordinate (latitude)
- Y-coordinate (longitude)
Example: 9500000 6.707640 46.690380
The ‘pseudo’ stop 9500000 is located at the given coordinates – or not (see above)
*F 02 1
9500000 6.707640 46.690380 % Rufbus Vaudt-Waadt SSI
9500001 6.707640 46.690380 % Rufbus Vaudt-Waadt SDI
9500002 6.707640 46.690380 % Rufbus Vaudt-Waadt SSS
9500003 6.707640 46.690380 % Rufbus Vaudt-Waadt SDS
9500004 6.707640 46.690380 % Rufbus Vaudt-Waadt SSD
9500005 6.707640 46.690380 % Rufbus Vaudt-Waadt SDD
9500006 9.408746 47.338530 % Rufbus Appenzell SSI
9500007 9.408746 47.338530 % Rufbus Appenzell SDI
9500008 9.408746 47.338530 % Rufbus Appenzell SSS
9500009 9.408746 47.338530 % Rufbus Appenzell SDS
9500010 9.408746 47.338530 % Rufbus Appenzell SSD
9500011 9.408746 47.338530 % Rufbus Appenzell SDD
BHFART
Bcomplies with the list of ‘virtual stops’ (see also description of FPLAN). Specifically, the characteristics of ‘pseudo’ locations and real stops are described here.
It includes:
- The number of the stop or the ‘virtual stops’
- B-Line (restrictions)
- Selection restriction as a stop as a bit field converted to an integer with
- Bit 0 = Closure as start
- Bit 1 = Closure as target
- Bit 2 = Closure as via
- Bit 3 = Display blocking
- Selection restriction for routing (bits as above)
- Selection restriction as a stop as a bit field converted to an integer with
- E-Line (properties)
- Property as one of:
- A: Stop area (e.g. ‘Hauptbahnhof – U-Bahn’)
- D: Departure mast, possibly with entrance (e.g. simple bus stop-
stats) - d: Depot
- E: Entrance to the stop
- F: Intermediate point of footpath (start/end of escalator, drive-in/exit
chair etc.) - g: petrol station
- H: hailing section Stop
- M: City meta (e.g. ‘Hannover’)
- m: Stop master (e.g. ‘Hannover Hauptbahnhof’)
- O: Operating point (measurement point)
- P: Pseudo-stop (a point in the route where the train does not necessarily
stops, e.g. a fare point) - S: simultaneously stop master, departure mast and, if necessary, entrance
aisle (e.g. a station that has not been crushed) - s: simultaneously stop area, departure mast and, if necessary, entrance
aisle (e.g. a non-grounded bus station as part of a main
station) - T: Stop for on-demand bus, non-scheduled (teletaxi)
- Property as one of:
- P-line
- Must not be removed, even if there are no journeys for this
Example: 9500000 B 7 0 Vaudt-Waadt call bus SSI ; 9500000 P % Vaudt-Waadt call bus SSI; 9500000 E T % Vaudt-Waadt call bus SSI; … ; 8510757 P; …
The ‘pseudo’ point 9500000 has the restrictions (no start/via as stops, no restriction for routing); must not be deleted; Stops for on-demand buses; … Stop 8510757 must not be deleted
*F 30 1 % Dateiformat
% Rufbus Vaudt-Waadt
% Haltestelle kann nicht start/ziel von Auswahl oder Routing sein
9500000 B 7 0 Rufbus Vaudt-Waadt SSI
% Haltestelle ist permanent wird erhalten auch ohne Fahrt
9500000 P % Rufbus Vaudt-Waadt SSI
% Haltestelle von Rufbus nicht liniengebunden
9500000 E T % Rufbus Vaudt-Waadt SSI
9500001 B 7 0 Rufbus Vaudt-Waadt SDI
9500001 P % Rufbus Vaudt-Waadt SDI
9500001 E T % Rufbus Vaudt-Waadt SDI
9500002 B 7 0 Rufbus Vaudt-Waadt SSS
9500002 P % Rufbus Vaudt-Waadt SSS
9500002 E T % Rufbus Vaudt-Waadt SSS
9500003 B 7 0 Rufbus Vaudt-Waadt SDS
9500003 P % Rufbus Vaudt-Waadt SDS
9500003 E T % Rufbus Vaudt-Waadt SDS
9500004 B 7 0 Rufbus Vaudt-Waadt SSD
9500004 P % Rufbus Vaudt-Waadt SSD
9500004 E T % Rufbus Vaudt-Waadt SSD
9500005 B 7 0 Rufbus Vaudt-Waadt SDD
9500005 P % Rufbus Vaudt-Waadt SDD
9500005 E T % Rufbus Vaudt-Waadt SDD
8510757 P % Granges (Veveyse), Les Girons % HS permanent (s.o.)
8501982 P % L'Isle, poste
8504779 P % Yvonand, Pré Hôtel de Ville
ZUGART
Contains details about the means of transport or categories. How they are described in different languages and their characteristics.
It includes:
- Type code
- Category Product class (0-13)
- Fare group (A-D)
- Output control with
- 0 Category and short line name or journey number
- 1 category only
- 2 only Short line name or journey number
- 3 no output
- +4 operators instead of category
- +8 Journey number instead of existing
- Output short line names
- Generic designation
- Surcharge with
- 0 No surcharge;
- 1 Obligation to award depends on the context;
- 2 generally subject to surcharge
- Flags with
- ‘N’ for: Category belongs to local transport
- ‘B’ for: Category belongs to shipping
- ‘F’ for: Category belongs to air traffic
- ‘T’ for: Category belongs to on-demand transport
- Language-dependent generic names in the format ‘#XYZ,’ with XYZ=0-999
Example: TEL 10 C 1 DRT 0 T #104
We define category TEL with category 10, tariff group C, for which only the category is issued, with the generic designation DRT, with no surcharge requirement, the flag for on-demand services and the link to the language-dependent generic name 104
Sprachabhängige Definitionen
They include:
- <text> – the introduction of the text definition
- <LANG> – the introduction of a language
- classXY – product classes between 00-13
- categoryXYZ – generic longnames
Example: <Deutsch>; class10 DRT/AST/Rufbus; category104 DRT
Product class names and generic long names will be introduced in German. Specifically, product class 10 (which is also referenced in the line ‘TEL 10 …’) is described as ‘DRT/AST/Rufbus,’ and the generic long name for category 104 (also referenced in the line ‘TEL…’ as #104) is described as ‘DRT’.
*F 06 1
% Gattung: TEL, Kat: 10, Ausgabe: 1 (nur Gattung),
% Gattungsbezeichnung: DRT, Zuschlag: 0 (frei), Flags: T (Bedarfsverk.)
% Sprachabhängigergattungsname: 104 (s.u.)
TEL 10 1 DRT 0 T #104
<text> %
<Deutsch> % Definition in Sprache Deutsch
class10 DRT/AST/Rufbus % Produktklasse 10 = «DRT/…»
category104 DRT % Gattungsnummer 104 = DRT
<Englisch> % s.o. in Englisch
class10 DRT/AST/Rufbus
category104 DRT
<Franzoesisch>
class10 DRT/AST/Rufbus
category104 DRT
<Italienisch>
class10 DRT/AST/Rufbus
category104 DRT
INFOTEXT
Describes further information about the journeys provided.
It includes a series of:
- Info text number
- Information text
Example: 900000000 https://www.postauto.ch/en/timetable-and-network/publicar/vaud
The information text with the number 900000000 describes https://www.postauto.ch/en/timetable-and-network/publicar/vaud
*F 11 1
% DRT Gebiet Vaudt Waadt
900000000 https://www.postauto.ch/en/timetable-and-network/publicar/vaud
900000001 Buchung über die PubliCar-App oder über 0800 603060 (6:00-24:00)
900000002 Reservation und Stornierung telefonisch bis eine Stunde vor Abfahrt (während Öffnungszeiten der Zentrale) möglich. Abfahrten vor 6 Uhr müssen am Vortag telefonisch bis spätestens eine Stunde vor Schliessung der Zentrale reserviert werden.
900000003 Reservierung bis 9 Personen möglich
900000004 Reservierung für Rollstuhl möglich
% DRT Gebiet
900000005 Buchung über die PubliCar-App oder über 0848 553060
900000006 Fahrten sind Reservierungspflichtig
900000007 Stornierung bis spätestens 30 Minuten vor Abholung
900000008 Reservierung für Rollstuhl möglich
900000009 Reservierung bis 9 Personen möglich
900000010 Gruppenreisen > 10 Personen möglich mit Ermässigung
900000011 https://www.postauto.ch/de/fahrplan-und-netz/publicar/appenzell
ATTRIBUT
Simply put, INFOTEXT templates are defined here that can be combined with various ‘dynamic’ texts from INFOTEXT. The combination is done using the *A and *I lines in the FPLAN.
They include:
- Attribute code (many of which are predefined)
- Stop affiliation
- 1: Attribute applies to the boarding stop
- 2: for the alighting stop
- 0: for the journey segment, i.e. on the route between boarding (only) and alighting (only)
- 4: for stops travelled through (intermediate stops)
- Output priority (0-999)
- Output fine sorting (0-99) – if prio equals
- The following applies to the issue:
- Prefix ‘#’
- Timetable data attributes
- Attribute code Route segment
- Attribute code Full route
Example: ZZ 0 050 50; # ZZ ZZ ZZ
Sprachabhängige Definitionen
They include:
- <text> – the introduction of the text definition
- <LANG> – the introduction of a language
- Attribute code
- Attribute text (references to INFOTEXT with ‘$’ prefix)
Example: <text> <Deutsch>; ZZ $IZZ; 1 Nur 1. Klasse
Basically, it simply displays the information text. Or “Nur 1. Klasse”.
As a higher-level example for combining FPLAN, INFOTEXT, and ATTRIBUT
ATTRIBUT: XY 0 001 50; <text> <Deutsch> XY Heute wird $IAB
INFOTEXT: 00000001 a beautiful day
FPLAN: *A XY; *I AB … 00000001
This would mean that the info text would be displayed as ‘Today is going to be a beautiful day’.
*F 09 1 % Dateityp attribut
% Code: ZZ, für Fahrtabschnitt (0), Prio: 050, Sortierung: 50
ZZ 0 050 50
1 0 1 5
% Ausgabe: ZZ für Fahrplan, Teilstrecke und Vollstrecke
# ZZ ZZ ZZ
# 1 1 1
% Ausgabeformat für verschiedene Sprachen mit Referenz auf infotext-Datei (s. auch fplan)
<text>
<deu>
ZZ $IZZ
1 Nur 1. Klasse
<eng>
ZZ $IZZ
1 1st class only
<fra>
ZZ $IZZ
1 Seulement 1re classe
<ita>
ZZ $IZZ
1 Solo 1a classe
(BITFELD)
How to use BITFELD is described in detail here HAFAS Rohdaten Format (HRDF). The BitViz tool from Tools & More can be used to display bit and hexa sequences.
ECKDATEN
The key data includes the start and end of the validity of the service plan.
