.services_settings
GtfsIntermodalReaderSettings property
The GtfsIntermodalReaderSettings instance is accessible via the GtfsIntermodalReader its
.settings property. It allows the user to configure the GtfsIntermodalReader.
We differentiate between:
The general settings are described here, and reflect general settings across the various aspects of the intermodal reader.
The services settings pertain to public transport services configurations and filtering, whereas the zoning settings as they relate to transfer zones (poles/platforms).
The EXTENDED GTFS RouteTypes (modes) are supported as defined in the GTFS specification. There is a default mapping available to PLANit predefined mode types, which may be altered by the user if so desired via the
services_Settings.
All methods marked as Compulsory=YES in the Methods section are expected to be configured by the user explicitly.
A GtfsIntermodalReaderSettings instance exposes the following methods. The Compulsory column indicates it the user
is expected to configure this setting explicitly or not.
| Name | Compulsory | Default | Description |
|---|---|---|---|
.set_input_file(+) |
YES | N/A | Set the input file to parse |
This class exposes the following properties
| Property | Availability | Description |
|---|---|---|
.services_settings |
Always | Settings specific to public transport services |
.zoning_settings |
Always | Settings specific to public transport transfer infrastructure |
from planit import *
# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)
# Network reader to use to impose GTFS on:
# Open Street Map (OSM) intermodal reader
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "Australia")
osm_reader.settings.set_input_file(SYDNEY_OSM_PBF_FILE_PATH)
# GTFS reader
gtfs_reader: GtfsIntermodalReaderWrapper = \
intermodal_converter.create_reader(IntermodalReaderType.GTFS, "Australia", osm_reader)
gtfs_reader.settings.set_input_file(SYDNEY_GTFS_FILE_PATH)
gtfs_reader.settings.services_settings.day_of_week = DayOfWeek.THURSDAY
gtfs_reader.settings.services_settings.add_time_period_filter(
datetime.time(hour=6, minute=0, second=0),
datetime.time(hour=9, minute=59, second=59)
)
# PLANit writer
planit_writer = intermodal_converter.create_writer(IntermodalWriterType.PLANIT)
planit_writer.settings.set_output_directory(OUTPUT_PATH)
planit_writer.settings.set_country("Australia")
# perform conversion (with services)
intermodal_converter.convert_with_services(gtfs_reader, planit_writer)
GtfsIntermodalReader GTFS intermodal reader class these settings reside on
Class GtfsIntermodalReaderSettingsWrapper in converterwrappers.py
GtfsIntermodalReaderSettings property
GtfsIntermodalReaderSettings property
GtfsIntermodalReaderSettings method
GtfsServicesReaderSettings instance
GtfsZoningReaderSettings instance