.set_country(+)
PlanitNetworkWriterSettings method
The PlanitNetworkWriterSettings
instance is accessible via the PlanitNetworkWriter
its .settings
property. It allows the user to configure the PlanitNetworkWriter.
All methods marked as Compulsory=YES
in the Methods section are expected to be configured by the user explicitly.
A PlanitNetworkWriterSettings
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_country(+) |
NO | Context dependent | Set the country this network resides in, used to determine the coordinate reference system to apply |
.set_file_name(+) |
NO | network.xml |
Set the network output file name to use (including extension) |
.set_output_directory(+) |
YES | N/A | Set the output directory to persist the Planit XML network file to |
N/A
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# Open Street Map (OSM) network reader
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# Planit network writer
planit_writer = network_converter.create_writer(NetworkWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
# perform conversion
network_converter.convert(osm_reader,planit_writer)
MatsimNetworkWriter
Matsim network writer class these settings reside on
Class WriterSettingsWrapper
in converterwrappers.py
PlanitNetworkWriterSettings method
PlanitNetworkWriterSettings method
PlanitNetworkWriterSettings method