.has_waiting_area_nominated_osm_way_for_stop_location(+)
OsmPublicTransportReaderSettings method
Description
Verify if explicit mapping for waiting area (platform, bus stop, station) to a nominated OSM way (by its OSM id) exists.
Signature
has_waiting_area_nominated_osm_way_for_stop_location(osm_waiting_area_id: int, osm_entity_type: OsmEntityType)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
osm_waiting_area_id |
int |
None |
N/A | Waiting area to verify |
osm_entity_type |
OsmEntityType<enum> |
None |
N/A | Type of waiting area (node, way) |
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)
# verify
assert osm_reader.settings.pt_settings.has_waiting_area_nominated_osm_way_for_stop_location(1234,OsmEntityType.WAY) is True
See also
N/A
Source code
Class OsmPublicTransportSettingsWrapper
in converterwrappers.py