NetworkReaderType.<enum>
NetworkReaderType types
Description
Class exposing the available types as enums for creating a particular type of network reader compatible with the PLANit
NetworkConverter
.
Fields
<enum> Fields | Description | Instance documentation |
---|---|---|
OSM |
Use to create an Open Street Map network reader through NetworkConverter instance |
N/A |
TNTP |
Use to create a TNTP network reader through NetworkConverter instance |
N/A |
PLANIT |
Use to create a PLANit native network reader through NetworkConverter instance |
N/A |
Example 1
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# Open Street Map reader
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# 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
NetworkConverter
for information on the NetworkConverter class
Source code
Class NetworkReaderType
in enums.py