.get_mapped_planit_road_mode(+)

OsmHighwaySettings 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_road_mode(mode: str) -> PredefinedModeType

with

Parameter Type Unit Default Description
mode str None N/A OSM road 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.highway_settings.get_mapped_planit_road_mode("foot")

See also

N/A

Source code

Class OsmHighwaySettingsWrapper in converterwrappers.py