.set_country(+)
MatsimNetworkWriterSettings method
The MatsimNetworkWriterSettings
instance is accessible via the MatsimNetworkWriter
its .settings
property. It allows the user to configure the MatsimNetworkWriter.
All methods marked as Compulsory=YES
in the Methods section are expected to be configured by the user explicitly.
A MatsimNetworkWriterSettings
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_generate_detailed_link_geometry_file(+) |
NO | False |
Generate additional detailed geometry file for nicer visualisation in Via |
.set_output_directory(+) |
YES | N/A | Set the output directory to persist the Matsim network file to |
.set_output_file(+) |
NO | network |
Set the network output file name to use (without extension) |
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>")
# 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(osm_reader,matsim_writer)
MatsimNetworkWriter
Matsim network writer class these settings reside on
Class WriterSettingsWrapper
in converterwrappers.py
MatsimNetworkWriterSettings method
MatsimNetworkWriterSettings method
MatsimNetworkWriterSettings method
MatsimNetworkWriterSettings method