.set_speed_limit_defaults_based_on_urban_area(+)
Description
All speed limit defaults for OSM roads (per mode) are based on defaults per OSM highway type. However, there are two different speed limits for each OSM highway type, one for an urban setting and one for a non-urban setting. Here the user can configure which of the two is to be used. The default is set to urban area.
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
Original speed limit defaults are country specific and when no country is provided to the reader, the global defaults will be in place.
More information on OSM modes; https://wiki.openstreetmap.org/wiki/Key:access
Signature
.set_speed_limit_defaults_based_on_urban_area(flag: bool)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
flag |
bool |
None |
True |
Indicate to use urban speed limit defaults |
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>")
# Use non-urban speed limit defaults
osm_reader.settings.highway_settings.set_speed_limit_defaults_based_on_urban_area(False)
See also
N/A
Source code
Class OsmHighwaySettingsWrapper
in converterwrappers.py