.deactivate_all_osm_railway_types()
OsmRailwaySettings method
Description
Deactivate all OSM railway types that are supported. Only to be used when other types are activated later on, if not it is suggested to simply deactivate the railway parser.
The provided types need to be in line with the OSM railway types’ name as outlined by Open Street Maps, see also https://wiki.openstreetmap.org/wiki/Key:railway
Signature
.deactivate_all_osm_railway_types()
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>")
# deactivate all then activate regular rail
osm_reader.settings.activate_railway_parser(True)
osm_reader.settings.railway_settings.deactivate_all_osm_railway_types()
osm_reader.settings.railway_settings.activate_osm_railway_types(["rail"])
See also
N/A
Source code
Class OsmRailwaySettingsWrapper in converterwrappers.py