.collect_allowed_osm_highway_modes(+)
OsmHighwaySettings method
Description
Collect the currently allowed OSM modes for a given OSM highway type
The provided types need to be in line with the OSM highway types’ name as outlined by Open Street Maps, see also https://wiki.openstreetmap.org/wiki/Key:highway
Signature
.collect_allowed_osm_highway_modes(highway_type: str) -> List[str]
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
highway_type |
str |
None |
N/A | OSM highway type |
Return type
List[str]
list of strings
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>")
# indicate to deactivate pedestrianised roads tagged as such in OSM
osm_modes: List[str] = osm_reader.settings.highway_settings.collect_allowed_osm_highway_modes("primary")
See also
N/A
Source code
Class OsmHighwaySettingsWrapper
in converterwrappers.py