IntermodalWriterType.<enum>
IntermodalWriterType types
Description
Class exposing the available types as enums for creating a particular type of intermodal (network) writer compatible
with the PLANit IntermodalConverter
.
Fields
<enum> Fields | Description | Instance documentation |
---|---|---|
MATSIM |
Use to create a MATSim intermodal writer through IntermodalConverter instance |
N/A |
SHAPE |
Use to create a GIS shape file based intermodal writer through IntermodalConverter instance |
N/A |
PLANIT |
Use to create a Planit native intermodal writer 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 IntermodalWriterType
in enums.py