.network_settings
OsmIntermodalReaderSettings property
The OsmIntermodalReaderSettings
instance is accessible via the OsmIntermodalReader
its .settings
property. It allows the user to configure the OsmIntermodalReader. We differentiate between:
The general network settings are identical to the settings exposed by the OsmNetworkReader and are described in detail under OsmNetworkReaderSettings. These settings configure everything related to the physical road and/or rail network.
The public transport settings are additional settings for the physical infrastructure directly related to the intermodal aspect of the reader, i.e., the parsing of bus stops, train stations, platforms, etc. When parsed this information is translated to PLANit transfer zones which in turn can be persisted using any supported IntermodalWriter.
All methods marked as Compulsory=YES
in the Methods section are expected to be configured by the user explicitly.
A OsmIntermodalReaderSettings
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 by the OSM intermodal reader |
.set_input_source(+) |
YES | N/A | Set the input source (URL streaming) to parse by the OSM intermodal reader |
.set_bounding_box(+) |
NO | TRUE |
Mark a bounding box to which the reader is restricted within the OSM file |
Setting either the input file or input source suffices, both need not be set.
This class exposes the following properties
Property | Availability | Description |
---|---|---|
.network_settings |
Always | Settings specific to physical road infrastructure |
.pt_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.NETWORK)
# example Open Street Map (OSM) intermodal reader
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
#or: osm_reader.settings.set_input_source("<URL_to_input_source>")
# example Planit intermodal writer
planit_writer = intermodal_converter.create_writer(IntermodalReaderType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
planit_writer.settings.set_country("<country_name>")
# perform conversion
intermodal_converter.convert(osm_reader,planit_writer)
OsmIntermodalReader
Osm intermodal reader class these settings reside on
Class OsmIntermodalReaderSettingsWrapper
in converterwrappers.py
OsmIntermodalReaderSettings property
OsmIntermodalReader property
OsmIntermodalReaderSettings method
OsmIntermodalReaderSettings method
OsmIntermodalReaderSettings method
OsmPublicTransportSettings instance