.add_allowed_highway_modes(+)
OsmHighwaySettings method
Description
Activate additional OSM modes to be allowed on specific OSM highway types in addition to the default allowed modes.
More information on OSM modes; https://wiki.openstreetmap.org/wiki/Key:access
Signature
.add_allowed_highway_modes(osm_highway_type: str, modes: List[str])
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
osm_highway_type |
str |
None |
N/A | The OSM highway type the modes apply to |
modes |
List of str |
None |
N/A | Additionally allowed OSM modes |
Return type
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 (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 explicitly allow bicycles on all pedestrianised roads by default
osm_reader.settings.highway_settings.add_allowed_highway_modes("pedestrian", "bicyle")
See also
N/A
Source code
Class OsmHighwaySettingsWrapper
in converterwrappers.py