.settings
GeometryNetworkWriter property
The GeometryNetworkWriter
class instance can be created via the NetworkConverter
.
It provides the functionality to persist a network’s nodes and links in a GIS based format.
Using this network writer the outputs can be used to easily visualise PLANit network and services in a GIS based environment such as ARCGis or QGIS.
All configuration of this writer is performed via its .settings
property, providing access to the
GeometryNetworkWriterSettings
.
The geometry network writer is based directly on the PLANit format, in this sense it does not perform a conversion but merely a different way of exporting the networks and services. Hence, no specific defaults regarding the conversion are required. Instead, all information is persisted 1:1 compared to the original PLANit data (only in a flat GIS format rather than its native hierarchical XML format)
The user is required to explicitly configure at least the following settings on a GeometryNetworkWriter
:
.settings.set_output_directory(+)
.settings.set_country(+)
N/A
This class exposes the following properties:
Property | Availability | Description |
---|---|---|
.settings |
Always | Access to GeometryNetworkWriterSettings to configure the writer |
from planit import *
planit = Planit()
# network converter
network_converter = planit.converter_factory.create(ConverterType.NETWORK)
# PLANit reader
planit_reader = network_converter.create_reader(NetworkReaderType.PLANIT, AUSTRALIA)
planit_reader.settings.set_input_directory(PLANIT_INPUT_PATH)
# GeoIo (GIS geometry shape) writer
geo_writer = network_converter.create_writer(NetworkWriterType.SHAPE)
geo_writer.settings.set_output_directory(OUTPUT_PATH)
geo_writer.settings.set_country("Australia")
# perform conversion
network_converter.convert(planit_reader, geo_writer)
GeometryNetworkWriterSettings
for configuration of the GIS network writer
ConverterFactory
for the converter factory to create other types of converters
NetworkReaderType
for the supported network reader types
NetworkWriterType
for the supported network writer types
Class GeometryNetworkWriterWrapper
in converterwrappers.py
GeometryNetworkWriter property