.settings
OsmIntermodalkReader property
The OsmIntermodalReader
class instance can be created via the IntermodalConverter
. It provides the functionality to parse an OSM intermodal network in the PLANit format, and possible persist it in another format using an IntermodalWriter.
All configuration of this reader is performed via its .settings
property, providing access to the OsmIntermodalReaderSettings
.
The OSM intermodal reader relies on defaults whenever tagging information is absent, or assumed to revert to the implicit default as prescribed by OSM itself. Wherever possible this OSM reader aligns itself with the prescribed OSM defaults. In addition, the user can change these defaults if they deem this necessary. The defaults regarding the “regular” network infrastructure follow the OsmNetworkReader defaults. The defaults specific to the intermodal aspects of this reader can be found under the defaults indicated for the various OsmPublicTransportSettings methods.
If, after reading the documentation, you are still unsure what defaults are adopted, have a look at the generated logs when using the reader. Planit will log the majority of the adopted defaults in its output when performing the OSM intermodal network reading.
The user is required to explicitly configure at least the following settings on an OsmIntermodalReader
:
.settings.set_input_file(+)
, or alternatively,.settings.set_input_source(+)
N/A
This class exposes the following properties:
Property | Availability | Description |
---|---|---|
.settings |
Always | Access to OsmIntermodalReaderSettings to configure the reader |
from planit import *
# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)
# 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>")
# 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)
OsmIntermodalReaderSettings
for configuration of the OSM intermodal (network) reader
ConverterFactory
for the converter factory to create other types of converters
IntermodalReaderType
for the supported intermodal reader types
IntermodalWriterType
for the supported intermodal writer types
OsmNetworkReader defaults detailing network defaults
OSM Intermodal Reader Defaults detailing defaults specific to intermodal reader
Class OsmIntermodalReaderWrapper
in converterwrappers.py
OsmIntermodalkReader property