.set_persist_service_legs(+)
GeometryServiceNetworkWriterSettings method
Description
Indicate whether to persist service legs (or not).
Signature
.set_persist_service_legs(flag: bool)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
flag |
bool |
None |
True |
The flag to indicate the choice |
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")
# Disable persisting service legs
geo_writer.settings.service_network_settings.set_persist_service_legs(False)
# perform conversion
converter.convert(planit_reader, geo_writer)
See also
N/A
Source code
Class GeometryServiceNetworkWriterSettingsWrapper
in converterwrappers.py