.set_file_name(+)
PlanitRoutedServicesWriterSettings method
The PlanitRoutedServicesWriterSettings
instance is accessible via the PlanitIntermodalWriterSettings
its .routed_services_settings
property. It allows the user to configure the
routed services aspects of the PlanitIntermodalWriter.
All methods marked as Compulsory=YES
in the Methods section are expected to be configured by the user explicitly.
A PlanitRoutedServicesWriterSettings
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_file_name(+) |
NO | routed_services.xml |
Set the routed services output file name to use (including extension) |
.set_log_services_without_trips(+) |
NO | False |
Indicate whether services without any trips assigned to them are logged to the user |
.set_output_dir(+) |
NO | N/A | Set the output directory to use for routed services XML file (only when the output directory is not set/differs from the intermodal writer settings, it should be set) |
N/A
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>")
# PLANit intermodal writer
planit_writer = intermodal_converter.create_writer(IntermodalWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
# configure routed services specific aspects of PLANit intermodal writer
planit_writer.settings.routed_services_settings.<some_method>
# perform conversion
intermodal_converter.convert(osm_reader,planit_writer)
PlanitIntermodalWriterSettings
PLANit intermodal writer settings class these routed services settings reside on
Class WriterSettingsWrapper
in converterwrappers.py
PlanitRoutedServicesWriterSettings method
PlanitRoutedServicesWriterSettings method
PlanitRoutedServicesWriterSettings method