GeometryIntermodalWriter

GeometryIntermodalWriter instance

The GeometryIntermodalWriter class instance can be created via the IntermodalConverter. It provides the functionality to persist an (intermodal) network with or without public transport support (transfer zones, connectoids) in a GIS based format. If so desired, it can also persist a virtual network GIS layer containing the connections between the zones and physical network by means of connectoid segments and links. We also support persisting the service network as a separate layer

Currently, we support shape files via this writer

Using this intermodal 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 GeometryIntermodalWriterSettings.

Defaults in Geometry Intermodal Writer

The geometry intermodal 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)

Minimum configuration requirements

The user is required to explicitly configure at least the following settings on a GeometryIntermodalWriter:

  • set an output directory via .settings.set_output_directory(+)
  • set the target country via .settings.set_country(+)

Methods

N/A

Properties

This class exposes the following properties:

Property Availability Description
.settings Always Access to GeometryIntermodalWriterSettings to configure the writer

Example 1 - Minimum required settings

from planit import *

planit = Planit()

# intermodal converter
intermodal_converter = planit.converter_factory.create(ConverterType.INTERMODAL)

# PLANit reader
planit_reader = intermodal_converter.create_reader(IntermodalReaderType.PLANIT, AUSTRALIA)
planit_reader.settings.set_input_directory(PLANIT_INPUT_PATH)

# GeoIo (GIS geometry shape) writer
geo_writer = intermodal_converter.create_writer(IntermodalWriterType.SHAPE)
geo_writer.settings.set_output_directory(OUTPUT_PATH)
geo_writer.settings.set_country("Australia")

# perform conversion (with pt services)
intermodal_converter.convert_with_services(planit_reader, geo_writer)

See also

GeometryIntermodalWriterSettings for configuration of the GIS intermodal writer
ConverterFactory for the converter factory to create other types of converters
IntermodalReaderType for the supported intermodal reader types
IntermodalWriterType for the supported intermodal writer types

Source code

Class GeometryIntermodalWriterWrapper in converterwrappers.py


.settings

GeometryIntermodalWriter property