.set_set_service_leg_segments_file_name(+)
GeometryServiceNetworkWriterSettings method
Description
Set the file name to use for the GIS service network service leg segments output (one per layer). The structure of each file name is set up as follows:
layer_<name_of_layer>_<user_defined_file_name>.shp
,
We prefix by the layer as to avoid name clashes in case the network has multiple (PLANit) layers.
Signature
.set_set_service_leg_segments_file_name(file_name: str)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
file_name |
str |
None |
planit_service_legsegments |
The file name to use |
Return type
N/A
Example
from planit import *
planit = Planit()
# converter
converter = planit.converter_factory.create(ConverterType.INTERMODAL)
# PLANit reader
planit_reader = converter.create_reader(IntermodalReaderType.PLANIT, AUSTRALIA)
planit_reader.settings.set_input_directory(PLANIT_INPUT_PATH)
# GeoIo (GIS geometry shape) writer
geo_writer = converter.create_writer(IntermodalWriterType.SHAPE)
geo_writer.settings.set_output_directory(OUTPUT_PATH)
geo_writer.settings.set_country("Australia")
# change name
geo_writer.settings.service_network_settings.set_set_service_leg_segments_file_name(`my_name`)
# perform conversion
converter.convert(planit_reader, geo_writer)
See also
N/A
Source code
Class GeometryServiceNetworkWriterSettingsWrapper
in converterwrappers.py