.set_remove_dangling_zones(+)
OsmPublicTransportReaderSettings method
Description
A dangling (transfer) zone (bus stop, platform, station) is a zone without connectoids (stop locations). The user can indicate via this method to remove (or not) dangling (Transfer) zones after parsing the OSM public transport infrastructure (poles, platforms, etc.). In case public transport infrastructure is incomplete - for example when residing at the edges of the bounding box - or it is incorrectly tagged such that the parser could not correctly parse all components, it is possible a transfer zone is left dangling.
Signature
.set_remove_dangling_zones(remove_dangling: bool)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
remove_dangling |
bool |
None |
True |
Flag indicating to remove dangling (transfer) zones |
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 remove dangling transfer zones
osm_reader.settings.pt_settings.set_remove_dangling_zones(False)
See also
N/A
Source code
Class OsmPublicTransportSettingsWrapper
in converterwrappers.py