.overwrite_capacity_max_density_defaults(+)
OsmWaterwaySettings method
Description
Override the default capacity (pcu/h/lane) and maximum density (pcu/km/lane) for the given OSM waterway 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 waterway types’ name as outlined in the defaults section
This property is made available but for waterways, yet it generally makes less sense to use than for, let’s say’ roads. Mostly relevant in case of ferry crossings that carry for example cars.
Signature
.overwrite_capacity_max_density_defaults(highway_type: str, capacity: float, max_density: float)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
waterway_type |
str |
None |
N/A | OSM waterway 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 ferry=motorway links
osm_reader.settings.waterway_settings.overwrite_capacity_max_density_defaults("motorway", 200, 175)
See also
N/A
Source code
Class OsmWaterwaySettingsWrapper
in converterwrappers.py