MatsimZoningWriterSettings

MatsimZoningWriterSettings instance

The MatsimZoningWriterSettings instance is accessible via the MatsimIntermodalWriterSettings its .zoning_settings property. It allows the user to configure the (transfer) zoning aspects of the MatsimIntermodalWriter.

Methods

A MatsimZoningWriterSettings 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_generate_matrix_based_pt_router_files(+) NO True When true, generate additional CSV files for MATSimMatrixBasedPtRouter.
.set_country(+) NO Context dependent Set the country this zoning resides in, used to determine the coordinate reference system to apply
.set_output_directory(+) NO N/A Set the output directory to persist the MATSim transit file(s) to
.set_output_file(+) NO N/A Not used

Properties

N/A

Example 1

from planit import *

# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)

# Open Street Map (OSM) intermodal reader        
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")

# MATSIM intermodal writer
matsim_writer = intermodal_converter.create_writer(IntermodalWriterType.MATSIM)
# This updates zoning and network output dir 
matsim_writer.settings.set_output_directory("<path_to_output_dir>")

# switch off generation of additional CSV files to support Matrix based PT routing in MATSim
matsim_writer.settings.zoning_settings.set_generate_matrix_based_pt_router_files(False) 

# perform conversion
intermodal_converter.convert(osm_reader,matsim_writer)

See also

MatsimIntermodalWriterSettings MATSim intermodal writer settings class these zoning settings reside on

Source code

Class WriterSettingsWrapper in converterwrappers.py


.set_country(+)

MatsimZoningWriterSettings method

.set_generate_matrix_based_pt_router_files(+)

MatsimZoningWriterSettings method

.set_output_directory(+)

MatsimZoningWriterSettings method

.set_output_file_name(+)

MatsimZoningWriterSettings method