Crates.io | transit_model |
lib.rs | transit_model |
version | 0.56.1 |
source | src |
created_at | 2019-04-02 12:38:12.376242 |
updated_at | 2023-05-22 08:40:39.213072 |
description | Transit data management |
homepage | |
repository | https://github.com/hove-io/transit_model |
max_upload_size | |
id | 125345 |
size | 1,054,549 |
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:
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 /ntfs
transit_model
is developed in Rust.
If you want to contribute or install binaries, you need to install a Rust environment: see rustup.rs
Based on PROJ, the proj
crate allows the transformation of
localization coordinates.
Some transit_model
's crates (see each documentation) use PROJ.
So it must be installed on the system to compile and use those crates.
The proj
crate requires PROJ.
If your system has pkg-config
and a sufficiently new version of PROJ installed, it will be used.
Otherwise, the crate falls back to building PROJ from source, which requires some build time dependencies.
To install PROJ build time dependencies, you can execute the following command (On Debian systems):
make install_proj_deps
You can also install the required PROJ version system-wide to avoid full rebuild (ex: cargo clean
):
make install_proj
PROJ installation instructions may help, too.
proj
crate is a binding to the C library.
PROJ is configured as a feature
of the transit_model
crate.
So to use it for coding, the proj
feature must be activated
(cargo build --features=proj
).
Then specific code should be conditionally enabled with
#[cfg(feature="proj")]
.
transit_model
is supporting most of NTFS format.
From the standard, some of the functionalities are not fully supported:
line_groups.txt
and line_group_links.txt
).trip_short_name_at_stop
in stop_times.txt
introduced in version
v0.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