.activate_osm_water_mode(+)
OsmWaterwaySettings method
Description
Activate chosen OSM water mode.
Currently, only a single water mode exists (ferry) and this is active by default when the waterway parser is activated. Therefore it is unlikely this method needs to be used in most cases.
Signature
.activate_osm_water_mode(mode: str)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
mode |
str |
None |
N/A | OSM water mode that is to be activated |
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>")
# activate ferry from the water modes to parse (Default is that this is already activated)
osm_reader.settings.activate_waterway_parser(True)
osm_reader.settings.waterway_settings.activate_osm_water_mode("ferry")
See also
N/A
Source code
Class OsmWaterwaySettingsWrapper
in converterwrappers.py