TntpZoningReaderSettings

TntpZoningReaderSettings instance

The TntpZoningReaderSettings instance is accessible via the TntpZoningReader its .settings property. It allows the user to configure the TntpZoningReader.

Minimum configuration requirements

The user is required to explicitly configure at least the following settings on TntpZoningReader:

  • set a network file via .set_network_file(+) since the zones are also nodes attached to links, they reside in the network file

Methods

A TntpZoningReaderSettings 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_network_file(+) YES N/A Set the network input file location

Various getters for the documented setters are available, e.g., .get_network_file() etc., they are not yet documented though, have a look in the source code for specifics.

Properties

N/A

Example 1 - Minimum required settings

from planit import *

planit_instance = Planit()

# TNTP net reader - prep
tntp_net_reader: TntpNetworkReaderWrapper = planit_instance.converter_factory.create(ConverterType.NETWORK) \
    .create_reader(NetworkReaderType.TNTP)
network_settings: TntpNetworkReaderSettingsWrapper = tntp_net_reader.settings
network_settings.set_network_file(NETWORK_FILE_PATH)
network_settings.set_node_coordinate_file(NODE_COORD_FILE_PATH)
network_settings.set_network_file_columns(create_tntp_network_file_cols())
# ... other settings

converter = planit_instance.converter_factory.create(ConverterType.ZONING)

# TNTP zon reader - prep (pass in net_reader)
tntp_zon_reader: TntpZoningReaderWrapper = converter.create(ConverterType.ZONING) \
    .create_reader(ZoningReaderType.TNTP, tntp_net_reader)
zoning_settings = tntp_zon_reader.settings
zoning_settings.set_network_file_location(NETWORK_FILE_PATH)

#PLANit zoning writer
planit_writer = converter.create_writer(ZoningWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")

# perform conversion
converter.convert(tntp_reader, planit_writer)

See also

TntpZoningReader TNTP zoning reader class these settings reside on

Source code

Class ReaderSettingsWrapper in converterwrappers.py


.set_network_file_location(+)

TntpNetworkReaderSettings method