[−][src]Struct transit_model::model::Collections
The set of collections representing the model.
Fields
contributors: CollectionWithId<Contributor>
datasets: CollectionWithId<Dataset>
networks: CollectionWithId<Network>
commercial_modes: CollectionWithId<CommercialMode>
lines: CollectionWithId<Line>
routes: CollectionWithId<Route>
vehicle_journeys: CollectionWithId<VehicleJourney>
frequencies: Collection<Frequency>
physical_modes: CollectionWithId<PhysicalMode>
stop_areas: CollectionWithId<StopArea>
stop_points: CollectionWithId<StopPoint>
stop_locations: CollectionWithId<StopLocation>
feed_infos: BTreeMap<String, String>
calendars: CollectionWithId<Calendar>
companies: CollectionWithId<Company>
comments: CollectionWithId<Comment>
equipments: CollectionWithId<Equipment>
transfers: Collection<Transfer>
trip_properties: CollectionWithId<TripProperty>
geometries: CollectionWithId<Geometry>
admin_stations: Collection<AdminStation>
stop_time_headsigns: HashMap<(String, u32), String>
stop_time_ids: HashMap<(String, u32), String>
stop_time_comments: HashMap<(String, u32), String>
prices_v1: Collection<PriceV1>
od_fares_v1: Collection<ODFareV1>
fares_v1: Collection<FareV1>
tickets: CollectionWithId<Ticket>
ticket_uses: CollectionWithId<TicketUse>
ticket_prices: Collection<TicketPrice>
ticket_use_perimeters: Collection<TicketUsePerimeter>
ticket_use_restrictions: Collection<TicketUseRestriction>
pathways: CollectionWithId<Pathway>
levels: CollectionWithId<Level>
grid_calendars: CollectionWithId<GridCalendar>
grid_exception_dates: Collection<GridExceptionDate>
grid_periods: Collection<GridPeriod>
grid_rel_calendar_line: Collection<GridRelCalendarLine>
Implementations
impl Collections
[src]
pub fn restrict_period(
&mut self,
start_date: NaiveDate,
end_date: NaiveDate
) -> Result<()>
[src]
&mut self,
start_date: NaiveDate,
end_date: NaiveDate
) -> Result<()>
Restrict the validity period of the current Collections
with the start_date and end_date
pub fn sanitize(&mut self) -> Result<()>
[src]
Keep the collections consistent for the new model by purging unreferenced data by calendars
pub fn enhance_with_co2(&mut self)
[src]
Physical mode should contains CO2 emissions. If the values are not present in the NTFS, some default values will be used.
pub fn enhance_line_opening_time(&mut self)
[src]
Sets the opening and closing times of lines (if they are missing).
pub fn enhance_trip_headsign(&mut self)
[src]
Trip headsign can be derived from the name of the stop point of the last stop time of the associated trip.
pub fn calendar_deduplication(&mut self)
[src]
Many calendars are identical and can be deduplicate
pub fn comment_deduplication(&mut self)
[src]
Some comments are identical and can be deduplicated
pub fn enhance_route_names(
&mut self,
routes_to_vehicle_journeys: &impl Relation<From = Route, To = VehicleJourney>
)
[src]
&mut self,
routes_to_vehicle_journeys: &impl Relation<From = Route, To = VehicleJourney>
)
If the route name is empty, it is derived from the most frequent
stop_area
origin and stop_area
destination of all the associated
trips. The stop_area
name is used to create the following String
:
[most frequent origin] - [most frequent destination]
If 2 stops have equal frequency, the biggest stop_area
(biggest number
of stop_point
) is chosen.
If still equality between multiple stop_area
, then alphabetical order
of stop_area
's name is used.
route.destination_id
is also replaced with the destination stop area
found with the above rules.
pub fn enhance_route_directions(&mut self)
[src]
If a route direction is empty, it's set by default with the "forward" value
pub fn calculate_validity_period(&self) -> Result<(Date, Date)>
[src]
Calculate the validity period in the 'Model'. The calculation is based on the minimum start date and the maximum end date of all the datasets. If no dataset is found, an error is returned.
Trait Implementations
impl AddPrefix for Collections
[src]
fn prefix(&mut self, prefix_conf: &PrefixConfiguration)
[src]
fn add_prefix(&mut self, prefix: &str)
[src]
fn add_prefix_with_sep(&mut self, prefix: &str, sep: &str)
[src]
impl Debug for Collections
[src]
impl Default for Collections
[src]
impl<'de> Deserialize<'de> for Collections
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Collections
[src]
Auto Trait Implementations
impl RefUnwindSafe for Collections
impl Send for Collections
impl Sync for Collections
impl Unpin for Collections
impl UnwindSafe for Collections
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,