.settings
PlanitNetworkReader property
The PlanitNetworkReader
class instance can be created via the NetworkConverter
. It provides the functionality to parse networks in the native Planit format, and possibly persist it in the same or another format using a NetworkWriter. Once created the user can configure its settings.
For information on the Planit XML format, please consult the Data formats/Input/Default section
All configuration of this reader is performed via its .settings
property, providing access to the PlanitNetworkReaderSettings
.
The user is required to explicitly configure at least the following settings on PlanitmNetworkReader:
.settings.set_inputdirectory(+)
N/A
This class exposes the following properties:
Property | Availability | Description |
---|---|---|
.settings |
Always | Access to PlanitNetworkReaderSettings to configure the reader |
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# PLANit network reader
planit_reader = network_converter.create_reader(NetworkReaderType.PLANIT)
planit_reader.settings.set_inputdirectory("<path_to_input_dir>")
# example Matsim network writer
matsim_writer = network_converter.create_writer(NetworkWriterType.MATSIM)
matsim_writer.settings.set_output_dir("<path_to_output_dir>")
# perform conversion
network_converter.convert(planit_reader,matsim_writer)
PlanitNetworkReaderSettings
for configuration of the Planit network reader
ConverterFactory
for the converter factory to create other types of converters
NetworkReaderType
for the supported network reader types
NetworkWriterType
for the supported network writer types
Class PlanitNetworkReaderWrapper
in converterwrappers.py
PlanitNetworkReader property