.deactivate_all_osm_road_modes_except(+)

OsmHighwaySettings method

Description

Deactivate all OSM road modes except the ones indicated.

More information on OSM modes; https://wiki.openstreetmap.org/wiki/Key:access

Signature

.deactivate_all_osm_road_modes_except(modes: List[str])

with

Parameter Type Unit Default Description
modes List of str None N/A OSM road modes that are not to be deactivated

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>")

# deactivate all modes except motorcars, i.e., regular private vehicles
osm_reader.settings.highway_settings.deactivate_all_osm_road_modes_except(["motorcar"])

See also

N/A

Source code

Class OsmHighwaySettingsWrapper in converterwrappers.py