Crate transit_model

Source
Expand description

The transit_model crate proposes a model to manage transit data. It can import and export data from GTFS and NTFS.

§Features

transit_model has 2 possible features: proj and xmllint.

§proj

proj feature is used for geolocation conversion (see Proj). proj feature is used, for example, to export NeTEx France format.

§xmllint

Most likely, you don’t need this feature as it’s only used for additional tests. It doesn’t add any functionality to transit_model. If you’re a contributor to the project, you might be interested to run these tests. In this case, take a look at the CONTRIBUTING.md for more information on this feature.

§gtfs

This is an experimental feature that exposes some gtfs functions for use in external projects

§parser

Some utilities to turn csv files into vector of objects or CollectionWithId (See https://github.com/hove-io/typed_index_collection/)

Re-exports§

pub use crate::model::Model;

Modules§

calendars
This exposes common information between GTFS and NTFS Mainly 2 common things are grouped here:
configuration
Some utilities for input dataset to the library.
gtfs
GTFS format management.
model
Definition of the navitia transit model.
netex_utils
Some utils to work with the NeTEx format, especially the frames.
ntfs
NTFS format management.
objects
The different objects contained in the navitia transit model.
serde_utils
Some utilities for serialize / deserialize transit model objects.
transfers
See function generates_transfers
validity_period
Some utilities to set and/or calculate validity periods.
vptranslator
See function translate

Macros§

properties_map
Helper to create a map of properties. Take a list of tuples (key, value).

Structs§

CURRENT_DATETIME
Current datetime
PrefixConfiguration
Metadata for building the prefix.

Constants§

GIT_VERSION
Precise git version of transit_model the version will be: v{last github tag}-{commit number}-{commit hash}{“-modified” if some changes have been done since last commit}
NTFS_VERSION
Current version of the NTFS format
TRANSFER_MAX_DISTANCE
The max distance in meters to compute the transfer
TRANSFER_WAITING_TIME
Waiting time at stop in second
TRANSFER_WALKING_SPEED
The walking speed in meters per second

Traits§

AddPrefix
Trait for object that can be prefixed

Functions§

binary_full_version
get the binary version and the transit_model version

Type Aliases§

Error
The error type used by the crate.
Result
The corresponding result type used by the crate.