.activate_waterway_parser(+)
OsmNetworkReaderSettings method
Description
Option to activate or deactivate the waterway parser, i.e., all waterways tagged with route=ferry
, and/or ferry=<activated_highway_type>
.
When activated the parser will consider all activated osm waterway types that are active. When deactivated it considers
none of them.
By default, the waterway parser is de-activated for the
OsmNetworkReader
and activated for theOsmIntermodalReader
.
Signature
.activate_waterway_parser(activate: bool)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
activate |
Boolean |
None |
True /False |
(de)Activate the OSM railway parser for rail based networks |
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)
# 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 only parse water network
osm_reader.activate_highway_parser(False)
osm_reader.activate_waterway_parser(True)
See also
.activate_railway_parser(+)
.activate_highway_parser(+)
.waterway_settings
for the settings related to OSM waterways
Source code
Class OsmNetworkReaderSettingsWrapper
in converterwrappers.py