IntermodalReaderType.<enum>

IntermodalReaderType types

Description

Class exposing the available types as enums for creating a particular type of intermodal (network) reader compatible with the Planit IntermodalConverter.

Fields

<enum> Fields Description Instance documentation
OSM Use to create an Open Street Map intermodal reader through IntermodalConverter instance N/A
GTFS Use to create an GTFS intermodal reader through IntermodalConverter instance N/A
PLANIT Use to create a Planit native intermodal reader through IntermodalConverter instance N/A

Example 1

from planit import *

# create an intermodal (network) converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)

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

# PLANit writer
planit_writer = intermodal_converter.create_writer(IntermodalWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
planit_writer.settings.set_country("<country_name>")

# perform conversion
intermodal_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 IntermodalConverter for information on the IntermodalConverter class

Source code

Class IntermodalReaderType in enums.py