ConverterType.<enum>

ConverterType types

Description

Class exposing the available types as enums for creating a particular type of converter through a ConverterFactory

Fields

<enum> Fields Description
NETWORK Use to create a NetworkConverter instance
ZONING Use to create an IntermodalConverter instance
INTERMODAL Use to create a ZoningConverter instance
SERVICE_NETWORK Use to create a ServiceNetworkConverter instance (not available yet)
ROUTED_SERVICES Use to create a RoutedServicesConverter instance (not available yet)

Example 1

from planit import *

# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)

# example Open Street Map reader        
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")

# example Planit writer
planit_writer = network_converter.create_writer(NetworkWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
planit_writer.settings.set_country("<country_name>")

# perform conversion
network_converter.convert(osm_reader,planit_writer)

See also

Planit on how to access the ConverterFactory instance via Planit instance
ConverterFactory for information on the ConverterFactory class

Source code

Class ConverterType in enums.py