.set_connect_dangling_ferry_stop_to_nearby_ferry_route(+)

OsmPublicTransportReaderSettings method

Description

A ferry stop/terminal is considered dangling when it is not connected to a water way link which in OSM typically would be an OSM way that has a tag route=ferry, or ferry=<some_highway_type in case it is a ferry that carries passengers and or vehicles.

If this is considered an error, or the user just wants a connected ferry network even if there is no known route visiting a particular terminal they can indicate to try and connect such dangling terminals/stops to nearby waterway links.

The search radius for this is governed by the set_ferry_stop_to_ferry_route_search_radius_meters method.

Signature

.set_connect_dangling_ferry_stop_to_nearby_ferry_route(flag: bool)

with

Parameter Type Unit Default Description
flag bool None True Flag indicating to try and connect dangling ferry stops

Return type

N/A

Example 1

from planit import *

# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)

# example Open Street Map (OSM) intermodal reader        
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")

# Do not connect dangling ferry stops
osm_reader.settings.pt_settings.set_connect_dangling_ferry_stop_to_nearby_ferry_route(False)

See also

N/A

Source code

Class OsmPublicTransportSettingsWrapper in converterwrappers.py