parse hafas rohdaten format files into a postgres db | Read-only mirror of https://github.com/BERNMOBIL/hrdfreader — BERNMOBIL. Issues & pull requests at the source.
  • Python 98.3%
  • Shell 1.1%
  • PLpgSQL 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-02-06 16:19:06 +01:00
db fix create db script 2023-11-13 16:44:30 +01:00
hrdf Change Gleise-File 2025-02-06 16:19:06 +01:00
vdv fix refreshMappingDataIntervalMin config 2023-03-31 14:20:28 +02:00
.gitignore HRDF-65: VDV-AUSREF-Basisfunktionalität 2022-03-20 22:59:38 +01:00
hrdfconfig.config Revert "Neue DB-Scripte mit aufgenommen" 2022-03-28 13:08:09 +02:00
hrdfgenerate.py HRDF-79: Neue Funktionalität zu Haltestellen-Statistikdaten eingearbeitet 2022-08-18 15:16:14 +02:00
hrdfgenerateStats.py HRDF-79: Aufruf-Erklärung korrigiert 2022-08-18 15:25:40 +02:00
hrdfgenerateSVC.py HRDF-63: Neuer TTG-Service zur automatischen Tagesfahrplangenerierung 2022-01-13 08:20:22 +01:00
hrdfimport.py add test-function for testing lines-per-stop 2022-12-22 15:06:41 +01:00
hrdfimportSVC.py HRDF-63: Korrektur der Aufrufparameter-Beschreibung 2021-12-31 11:44:29 +01:00
hrdfreader.pyproj HRDF-83: Umstellen das ProduktID-Mapping von categoryno auf categorycode 2022-08-18 19:55:15 +02:00
hrdfreader.sln Initial commit 2019-03-17 23:08:22 +01:00
LICENSE Initial commit 2018-12-31 14:50:22 +01:00
README.md Update README.md 2023-08-14 09:08:07 +02:00
requirements.txt remove psycopg2 from requirements 2022-03-21 16:27:21 +01:00
vdvconfig.config HRDF-70: Erweitern von 7stelligen HaltID's auf 9stellige HaltID's 2022-03-28 17:33:36 +02:00
vdvSVC.py HRDF-65: VDV-AUSREF-Basisfunktionalität 2022-03-20 22:59:38 +01:00

hrdfreader Current Version

parse hafas rohdaten format files into a postgres db

Description

hrdfreader is used to import timetable data in HAFAS Rohdaten Format and is optimized for swiss public transport data as provided by opentransportdata.ch

The focus is set on analytics and fast access to departures of a given day.

It can manage multiple publications of timetable data and has features for automatic data import and time table generation. Since version 2.1.1 there's also a VDV454 AUSRef server integrated to convert HRDF data into 'Linienfahrplan' data as used for public transport in Switzerland.

Installation

clone repository

prepare database using ./db/create/create-hrdf.sh

customize settings in hrdfconfig.config customize settings in vdvconfig.conf, if VDV server is needed

How to use

# import data from .zip file
hrdfimport.py <importFile>

# generate daily timetables
hrdfgenerate.py  <eckdatenId> [<generateFrom> <generateTo>]

Automation

You can set up cronjobs for

hrdfimportSVC.py - to regularly check for new data and import it

hrdfgenerateSVC.py - to generate daily timetables for the configured range of days

Configuration is done in hrdfconfig.config

Version History

  • 2.2.0
    • FIX: Lookuptable for Haltepositionstexte gets too big to be stored in memory
  • 2.1.2
    • ADD: View for stop point identification
  • 2.1.1
    • ADD: VDV454 AUSRef Server
    • ADD: tables for conversion from HRDF formats to PT CH specific VDV formats
  • 2.0.2
    • ADD: Automation of import and generation (cronjob needed)
    • ADD: config file for individual settings
  • 2.0.1
    • ADD: Debug Mode for Logging
    • Change: Based on Swiss HRDF 5.40.41
  • 1.0
    • Support for Swiss HRDF 5.20.xx

Meta

Distributed under the LGPL-3.0 license. See LICENSE for more information.