1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
// Copyright (C) 2017 Kisio Digital and/or its affiliates. // // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU Affero General Public License as published by the // Free Software Foundation, version 3. // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more // details. // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/> //! The `transit_model` crate proposes a model to manage transit data. //! It can import and export data from //! [GTFS](https://gtfs.org/reference/static) and //! [NTFS](https://github.com/CanalTP/ntfs-specification/blob/master/ntfs_fr.md). #![deny(missing_docs)] #[macro_use] mod utils; mod add_prefix; pub use add_prefix::AddPrefix; pub mod calendars; #[macro_use] pub mod objects; pub mod gtfs; pub mod model; #[cfg(feature = "proj")] pub mod netex_france; pub mod netex_utils; pub mod ntfs; pub mod read_utils; #[doc(hidden)] pub mod test_utils; pub mod transfers; pub mod validity_period; pub mod vptranslator; /// Current version of the NTFS format pub const NTFS_VERSION: &str = "0.11.2"; /// The max distance in meters to compute the tranfer pub const TRANSFER_MAX_DISTANCE: &str = "500"; /// The walking speed in meters per second pub const TRANSFER_WAKING_SPEED: &str = "0.785"; /// Waiting time at stop in second pub const TRANSFER_WAITING_TIME: &str = "60"; lazy_static::lazy_static! { /// Current datetime pub static ref CURRENT_DATETIME: String = chrono::Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true); } /// The error type used by the crate. pub type Error = failure::Error; /// The corresponding result type used by the crate. pub type Result<T> = std::result::Result<T, Error>; pub use crate::model::Model;