.set_file_name(+)
PlanitZoningWriterSettings method
Description
Set a different file name to use for the zoning output file, including the extension. The default file name used is
zoning.xml. The Planit zoning output is in XML format, hence it is recommended to always use the .xml
file extension in the file name.
Signature
.set_file_name(output_file_name:str)
with
| Parameter | Type | Unit | Default | Description |
|---|---|---|---|---|
output_file_name |
String |
None |
zoning |
The output file name (including extension) |
Return type
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>")
# Set output file name explicitly
planit_writer.settings.zoning_settings.set_file_name("my_planit_zoning.xml")
# perform conversion
intermodal_converter.convert(osm_reader,planit_writer)
See also
N/A
Source code
Class WriterSettingsWrapper in converterwrappers.py