.set_persist_service_leg_segments(+)
GeometryServiceNetworkWriterSettings method
Description
Indicate whether to persist service leg segments (or not). Service leg segments may represent one or more physical link segments of the underlying physical road network.
Opposed to service legs, leg segments are directional.
Signature
.set_persist_service_leg_segments(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 leg segments
geo_writer.settings.service_network_settings.set_persist_service_leg_segments(False)
# perform conversion
converter.convert(planit_reader, geo_writer)
See also
N/A
Source code
Class GeometryNetworkWriterSettingsWrapper
in converterwrappers.py