transit_model is a Rust crate to manage, convert and enrich transit
data.
This is done by implementing the NTFS model (used in navitia).
This repository regroups crates that offer enabler-libraries and binaries to convert and enrich transit data.
Additionally, transit_model is itself a library providing various
functionalities. Please refer to the code, examples and
documentation to discover them.
Please check documentation attached to each crate:
- binary gtfs2netexfr converts GTFS data format into NeTEx-France data format.
- binary gtfs2ntfs converts GTFS data format into NTFS data format.
- binary ntfs2gtfs converts NTFS data format into GTFS data format.
- binary ntfs2netexfr converts NTFS data format into NeTEx-France data format.
- binary ntfs2ntfs checks and cleans a NTFS dataset.
- binary restrict-validity-period restricts the validity period of a NTFS dataset and purges out-of-date data.
For all the binaries mentioned above, it is also possible to use them with
Docker. All the binaries are part of the image navitia/transit_model which
is tagged alongside the crate transit_model. Let's use gtfs2ntfs as an
example.
mkdir output-ntfs/
docker run \
--volume "${PWD}/tests/fixtures/gtfs:/gtfs" \
--volume "${PWD}/output-ntfs:/ntfs" \
navitia/transit_model \
gtfs2ntfs \
--input /gtfs \
--output /ntfstransit_model is developed in Rust.
If you want to contribute or install binaries, you need to install a Rust environment: see rustup.rs
The NeTEx France export (module netex_france) is gated behind the netex
cargo feature (cargo build --features=netex). Code specific to it should be
conditionally enabled with #[cfg(feature = "netex")].
transit_model is supporting most of NTFS format.
From the standard, some of the functionalities are not fully supported:
- No support for Line Groups (files
line_groups.txtandline_group_links.txt). - The field
trip_short_name_at_stopinstop_times.txtintroduced in versionv0.10.0(see NTFS changelog in French) is not supported.
Please see CONTRIBUTING to know more about the code or how to test, contribute, report issues.
Licensed under GNU Affero General Public License v3.0