OsmHighwaySettings

OsmHighwaySettings instance

The OsmHighwaySettings are accessible via the OsmNetworkReaderSettings.highway_settings property. It allows the user to configure the settings specific to OSM entities that are tagged as highway= which means all road based infrastructure including foot ways and cycle paths.

Here the user can choose which types of OSM highways to activate and deactivate in relation to the defaults that are already created based on the country of origin (or global defaults if no country is provided). Further modes can be allowed or disallowed access to specific types of highways in default situations. Of course, if the tagging explicitly allows or disallows access to modes, this takes precedence.

Methods

A OsmHighwaySettings instance exposes the following methods.

Name Default Description
.activate_all_osm_highway_types() N/A Activate all supported OSM highway types
.activate_osm_highway_types(+) N/A Activate OSM highway types indicated
.add_allowed_highway_modes(+) N/A Add additional allowed OSM modes to OSM highway type as a default
.deactivate_all_osm_highway_types_except(+) N/A Deactivate all supported OSM highway types except the ones indicated
.deactivate_all_road_modes_except(+) N/A Deactivate all OSM road modes except the ones indicated
.deactivate_road_modes(+) N/A Deactivate indicated OSM road modes
.deactivate_osm_highway_type(+) N/A Deactivate OSM highway type
.overwrite_capacity_max_density_defaults(+) N/A Overwrite the default capacity (pcu/h/lane) max density (pcu/km/lane) for a given OSM highway type
.remove_osm_road_mode_planit_mode_mapping(+) N/A Remove an existing (default) OSM road mode to Planit road mode mapping
.set_default_when_osm_highway_type_unsupported(+) tertiary default OSM highway type to use when unsupported type is encountered that is not deactivated
.set_speed_limit_defaults_based_on_urban_area(+) True Indicate of speed limit defaults are to be based on urban area or non-urban area defaults

Properties

N/A

Example 1

from planit import *

# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)

# example 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 activate all supported OSM highway types for parsing a detailed network
osm_reader.settings.highway_settings.activate_all_osm_highway_types()

See also

NetworkReaderSettings parent settings class
OsmHighwaySettings settings for OSM highways

Source code

Class ReaderSettingsWrapper in converterwrappers.py


.activate_all_osm_highway_types()

OsmHighwaySettings method

.activate_osm_highway_types(+)

OsmHighwaySettings method

.add_allowed_highway_modes(+)

OsmHighwaySettings method

.deactivate_all_osm_highway_types_except(+)

OsmHighwaySettings method

.deactivate_all_road_modes_except(+)

OsmHighwaySettings method

.deactivate_osm_highway_type(+)

OsmHighwaySettings method

.deactivate_road_modes(+)

OsmHighwaySettings method

.overwrite_capacity_max_density_defaults(+)

OsmHighwaySettings method

.remove_osm_road_mode_planit_mode_mapping(+)

OsmHighwaySettings method

.set_default_when_osm_highway_type_unsupported(+)

OsmHighwaySettings method

.set_speed_limit_defaults_based_on_urban_area(+)

OsmHighwaySettings method

Last modified January 1, 0001