.set_file_name(+)
PlanitNetworkWriterSettings method
Description
Set a different file name to use for the network output file, including the extension.
The default file name used is network.xml
. The Planit network 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 |
network |
The output file name (including extension) |
Return type
N/A
Example 1
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# Open Street Map (OSM) network reader
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# Planit network writer
planit_writer = network_converter.create_writer(NetworkWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
# Set output file name explicitly
planit_writer.settings.set_file_name("my_planit_network.xml")
# perform conversion
network_converter.convert(osm_reader,planit_writer)
See also
N/A
Source code
Class WriterSettingsWrapper
in converterwrappers.py