.set_input_directory(+)
PlanitNetworkReaderSettings method
The PlanitNetworkReaderSettings
instance is accessible via the PlanitNetworkReader
its .settings
property. It allows the user to configure the PlanitNetworkReader.
All methods marked as Compulsory=YES
in the Methods section are expected to be configured by the user explicitly.
A PlanitNetworkReaderSettings
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_directory(+) |
YES | TRUE |
Set the input directory to search for network XML file |
.set_xml_file_extension(+) |
NO | xml |
Change the file extension to look consider in case the xml file does not use the regular .xml extension |
N/A
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# PLANit XML network reader
planit_reader = network_converter.create_reader(NetworkReaderType.PLANIT)
planit_reader.settings.set_input_directory("<dir_to_input_file>")
# example MATSim network writer
matsim_writer = network_converter.create_writer(NetworkWriterType.MATSIM)
matsim_writer.settings.set_output_directory("<path_to_output_dir>")
# perform conversion
network_converter.convert(planit_reader,matsim_writer)
PlanitNetworkReader
PLANit network reader class these settings reside on
Class ReaderSettingsWrapper
in converterwrappers.py
PlanitNetworkReaderSettings method
PlanitNetworkReaderSettings method