.overwrite_waiting_area_mode_access(+)

OsmPublicTransportReaderSettings method

Description

Via this method the user can override the modes that a waiting area (pole, platform, station) supports. this can be useful when relevant tagging on mode access is absent or cannot be derived from the road/rail ways nearby.

The entity type parameter is required since waiting areas can be OSM nodes or ways and OSM ids are only unique within each type.

Signature

overwrite_waiting_area_mode_access(osm_waiting_area_id: int, osm_entity_type: OsmEntityType, mode_access: List[str])

with

Parameter Type Unit Default Description
osm_waiting_area_id int None N/A Waiting area to override for
osm_entity_type OsmEntityType<enum> None N/A Type of waiting area (node, way)
mode_access List of str None N/A OSM modes that are deemed eligible

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>")

# Map waiting area 1234 (which is a way, i.e. likely a platform) to OSM way 56789
osm_reader.settings.pt_settings.overwrite_waiting_area_nominated_osm_way_for_stop_location(1234,OsmEntityType.WAY,56789)

# Map waiting area 4321 (which is a node, i.e. likely a bus stop) to OSM way 9876
osm_reader.settings.pt_settings.overwrite_waiting_area_mode_access(4321,OsmEntityType.NODE,['tram']])

See also

N/A

Source code

Class OsmPublicTransportSettingsWrapper in converterwrappers.py