.set_country(+)
PlanitZoningWriterSettings method
The PlanitZoningWriterSettings instance is accessible via the PlanitIntermodalWriterSettings
its .zoning_settings property. It allows the user to configure the zoning aspects of
the PlanitIntermodalWriter.
All methods marked as Compulsory=YES in the Methods section are expected to be configured by the user explicitly.
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 | zoning.xml |
Set the zoning output file name to use (including extension) |
.set_output_dir(+) |
NO | N/A | Set the output 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) |
N/A
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)
PlanitIntermodalWriterSettings Planit intermodal writer settings class these zoning settings reside on
Class WriterSettingsWrapper in converterwrappers.py
PlanitZoningWriterSettings method
PlanitZoningWriterSettings method
PlanitZoningWriterSettings method