.activate_all_osm_railway_types()
OsmrailwaySettings method
The OsmRailwaySettings
are accessible via the OsmNetworkReaderSettings.railway_settings
property. It allows the user to configure the settings specific to OSM entities that are tagged as railway=
which means all track/rail based infrastructure.
Here the user can choose which types of OSM railways 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 railways in default situations. Of course, if the tagging explicitly allows or disallows access to modes, this takes precedence.
A OsmRailwaySettings
instance exposes the following methods.
Name | Default | Description |
---|---|---|
.activate_all_osm_railway_types() |
N/A | Activate all supported OSM railway types |
.activate_osm_rail_mode(+) |
N/A | Deactivate indicated OSM rail mode |
.activate_osm_railway_types(+) |
N/A | Activate OSM railway types indicated |
.deactivate_all_osm_railway_types() |
N/A | Deactivate all supported OSM railway types |
.deactivate_all_osm_railway_types_except(+) |
N/A | Deactivate all supported OSM railway types except the ones indicated |
.deactivate_all_osm_rail_modes_except(+) |
N/A | Deactivate all OSM rail modes except the ones indicated |
.deactivate_all_osm_rail_modes() |
N/A | Deactivate all OSM rail modes |
.deactivate_osm_railway_type(+) |
N/A | Deactivate OSM railway type |
.deactivate_osm_rail_modes(+) |
N/A | Deactivate indicated OSM rail modes |
.deactivate_osm_rail_mode(+) |
N/A | Deactivate indicated OSM rail mode |
.get_default_speed_limit_by_osm_railway_type(+) |
N/A | Collect the default speed limit (km/h) for a given OSM railway type |
.get_mapped_osm_rail_modes(+) |
N/A | Get the OSM modes that all map to the provided PLANit mode |
.get_mapped_planit_rail_mode(+) |
N/A | Get the PLANit predefined mode mapped to the OSM mode provided |
.is_osm_railway_type_activated(+) |
N/A | Verify if OSM railway type is activated |
.is_osm_railway_type_deactivated(+) |
N/A | Verify if OSM railway type is deactivated |
.overwrite_capacity_max_density_defaults(+) |
N/A | Overwrite the default capacity (pcu/h/lane) max density (pcu/km/lane) for a given OSM railway type |
N/A
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 railway types for parsing all rail based infrastructure
osm_reader.settings.activate_railway_parser(True)
osm_reader.settings.railway_settings.activate_all_osm_railway_types()
NetworkReaderSettings parent settings class
OsmHighwaySettings settings for OSM highways
OsmWaterwaySettings settings for OSM waterways
Class OsmRailwaySettingsWrapper
in converterwrappers.py
OsmrailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmHighwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method
OsmRailwaySettings method