PlanitServiceNetworkWriterSettings

PlanitServiceNetworkWriterSettings instance

The PlanitServiceNetworkWriterSettings instance is accessible via the PlanitIntermodalWriterSettings its .service_network_settings property. It allows the user to configure the service network aspects of the PlanitIntermodalWriter on which the routed services are placed.

Minimum configuration requirements

All methods marked as Compulsory=YES in the Methods section are expected to be configured by the user explicitly.

Methods

A PlanitServiceNetworkWriterSettings 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 service_network.xml Set the service network output file name to use (including extension)
.set_output_dir(+) NO N/A Set the output directory to use for service network XML file (only when the output directory is not set/differs from the intermodal writer settings, it should be set)

Properties

N/A

Example 1

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 service network specific aspects of PLANit intermodal writer
planit_writer.settings.service_network_settings.<some_method>

# perform conversion
intermodal_converter.convert(osm_reader,planit_writer)

See also

PlanitIntermodalWriterSettings PLANit intermodal writer settings class these service network settings reside on

Source code

Class WriterSettingsWrapper in converterwrappers.py


.set_file_name(+)

PlanitServiceNetworkWriterSettings method

.set_output_directory(+)

PlanitServiceNetworkWriterSettings method