.get_mapped_planit_rail_mode(+)
OsmRailwaySettings method
Description
Get the PLANit predefined mode type that is mapped to the provided OSM mode.
More information on OSM modes; https://wiki.openstreetmap.org/wiki/Key:access
Signature
.get_mapped_planit_rail_mode(mode: str) -> PredefinedModeType
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
mode |
str |
None |
N/A | OSM rail mode |
Return type
PredefinedModeType
enum
Example 1
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# Open Street Map (OSM) network reader
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# get mapped PLANit mode
planit_mode: PredefinedModeType = osm_reader.settings.railway_settings.get_mapped_planit_road_mode("rail")
See also
N/A
Source code
Class OsmRailwaySettingsWrapper
in converterwrappers.py