MatsimNetworkWriterSettings

MatsimNetworkWriterSettings instance

The MatsimNetworkWriterSettings instance is accessible via the MatsimNetworkWriter its .settings property. It allows the user to configure the MatsimNetworkWriter.

Minimum configuration requirements

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

Methods

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_restrict_link_speed_by_supported_modes(+) NO False Flag to indicate whether link speeds are to be capped by the supporting mode’s max speed if that is lower
.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)

Properties

N/A

Example 1 - Minimum required settings

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)

See also

MatsimNetworkWriter Matsim network writer class these settings reside on

Source code

Class WriterSettingsWrapper in converterwrappers.py


.set_country(+)

MatsimNetworkWriterSettings method

.set_generate_detailed_link_geometry_file(+)

MatsimNetworkWriterSettings method

.set_output_directory(+)

MatsimNetworkWriterSettings method

.set_output_file_name(+)

MatsimNetworkWriterSettings method

.set_restrict_link_speed_by_supported_modes(+)

MatsimNetworkWriterSettings method