.set_generate_detailed_link_geometry_file(+)

MatsimNetworkWriterSettings method

Description

Indicate to generate detailed link geometries as a separate file to enhance the viewing of the network in Via. MATSim only stores the start and end node of its links which makes it problematic to view if the links are long, by generating a detailed link geometry containing the internal shapes of each link this is circumvented when viewing the network in this particular viewer.

When switched on the additional geometry file will be placed in the same directory as the network file and is named network_geometry.txt. for more information on the format of this text file, we refer the reader to the Simunto website

Signature

.set_generate_detailed_link_geometry_file(detail_geometry:bool)

with

Parameter Type Unit Default Description
detail_geometry Boolean None False Generate detailed geometry or not flag

Return type

N/A

Example 1

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, "Australia")
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>")

# Switch on detailed link geometry generation
matsim_writer.settings.set_generate_detailed_link_geometry_file(True)

# perform conversion
network_converter.convert(osm_reader,matsim_writer)

See also

N/A

Source code

Class WriterSettingsWrapper in converterwrappers.py