.get_mapped_osm_road_modes(+)
OsmHighwaySettings method
Description
Get the OSM modes that are mapped to the provided PLANit predefined mode.
More information on OSM modes; https://wiki.openstreetmap.org/wiki/Key:access
Signature
.get_mapped_osm_road_modes(planit_mode: PredefinedModeType) -> List[str]
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
planit_mode |
PredefinedModeType |
None |
N/A | PLANit mode |
Return type
List[str]
osm road modes as list of string
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 OSM modes
osm_car_modes: List[str] = osm_reader.settings.highway_settings.get_mapped_osm_road_modes(PredefinedModeType.CAR)
See also
N/A
Source code
Class OsmHighwaySettingsWrapper
in converterwrappers.py