.set_persist_virtual_network(+)
GeometryZoningWriterSettings method
Description
Indicate whether to persist the connections between the (od/transfer) zones and an underlying physical network.
In PLANit the zoning system can be overlayed on an road network, To then have connections between the two a virtual network is created making connections between the zone and (road/rail/water) network via connectoids. These are geographically represented (in the geometrywriter) as virtual links (traditionally often referred to as connectors).
When persistence of the virtual network is activated these connectoids (connectoid nodes, edges and segments) will be persisted to disk.
Signature
.set_persist_virtual_network(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()
# zoning converter
zoning_converter = planit.converter_factory.create(ConverterType.ZONING)
# prerequisite network reader
# PLANIT_INPUT_PATH = ...
planit_net_reader = planit_instance.converter_factory.create(ConverterType.NETWORK).create_reader(NetworkReaderType.PLANIT)
planit_net_reader.settings.set_input_directory(PLANIT_INPUT_PATH)
# PLANit zoning reader
planit_reader = zoning_converter.create_reader(ZoningReaderType.PLANIT, planit_net_reader)
planit_reader.settings.set_inputdirectory(PLANIT_INPUT_PATH)
# GeoIo (GIS geometry shape) writer
geo_writer = zoning_converter.create_writer(ZoningWriterType.SHAPE)
geo_writer.settings.set_output_directory(OUTPUT_PATH)
geo_writer.settings.set_country("Australia")
#Disable persisting the virtual network
geo_writer.settings.set_persist_virtual_network(False)
# perform conversion
zoning_converter.convert(planit_reader, geo_writer)
See also
N/A
Source code
Class GeometryZoningWriterSettingsWrapper
in converterwrappers.py