PlanitZoningWriterSettings

PlanitZoningWriterSettings instance

The PlanitZoningWriterSettings instance is accessible via the PlanitIntermodalWriterSettings its .zoning_settings property. It allows the user to configure the zoning aspects of the PlanitIntermodalWriter.

Minimum configuration requirements

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

Methods

A PlanitZoningWriterSettings 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 zoning resides in, used to determine the coordinate reference system to apply
.set_file_name(+) NO network.xml Set the zoning output file name to use (including extension)
.set_output_directory(+) NO N/A Set the ouput directory to use for zoning XML file (only when the output directory is not set/differs from the intermodal writer settings, it should be set)

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

# PLANit intermodal writer
planit_writer = intermodal_converter.create_writer(IntermodalWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")

# configure zoning specific aspects of PLANit intermodal writer
planit_writer.settings.zoning_settings.<some_method>

# perform conversion
intermodal_converter.convert(osm_reader,planit_writer)

See also

PlanitIntermodalWriterSettings Planit intermodal writer settings class these zoning settings reside on

Source code

Class WriterSettingsWrapper in converterwrappers.py


.set_country(+)

PlanitZoningWriterSettings method

.set_file_name(+)

PlanitZoningWriterSettings method

.set_output_directory(+)

PlanitNetworkWriterSettings method

Last modified January 1, 0001