.overwrite_capacity_max_density_defaults(+)

OsmHighwaySettings method

Description

Override the default capacity (pcu/h/lane) and maximum density (pcu/km/lane) for the given OSM highway type.

Original defaults are country specific and when no country is provided to the reader, the global defaults will be in place.

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

.overwrite_capacity_max_density_defaults(highway_type: str, capacity: float, max_density: float)

with

Parameter Type Unit Default Description
highway_type str None N/A OSM highway type to set the new defaults for
capacity float pcu/h/lane N/A New capacity to use
max_density float pcu/km/lane N/A New maximum density to use

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

# set new defaults for capacity and max density on highway=motorway links
osm_reader.settings.highway_settings.overwrite_capacity_max_density_defaults("motorway", 2200, 175)

See also

N/A

Source code

Class OsmHighwaySettingsWrapper in converterwrappers.py