.get_overwritten_gtfs_stop_to_link_mapping(+)
GtfsZoningReaderSettings method
Description
Collect the force overridden mapping between a GTFS stop and the link it services (assuming it is overridden).
Signature
.get_overwritten_gtfs_stop_to_link_mapping(gtfs_stop_id: str) -> Tuple[Union[int, str], IdMapperType]
Return type
Tuple[Union[int, str], IdMapperType]
where:
- the first entry of the tuple reflects the mapped link id
- the second entry of the tuple reflects the type of id the link id represents
Example 1
from planit import *
# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)
from planit import *
# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)
# <some_intermodal_reader> = construct OSM or PLANit intermodal reader for example
# GTFS reader
gtfs_reader: GtfsIntermodalReaderWrapper = \
intermodal_converter.create_reader(IntermodalReaderType.GTFS, "Australia", <some_intermodal_reader>)
## override mapping explicitly and then collect it ##
## override mapping explicitly ##
gtfs_reader.settings.zoning_settings.overwrite_gtfs_stop_to_link_mapping(
"gtfs_Stop_id_1", "osm_way_id", IdMapperType.EXTERNAL)
assert gtfs_reader.settings.zoning_settings.get_overwritten_gtfs_stop_to_link_mapping("gtfs_Stop_id_1") is True
See also
N/A
Source code
Class GtfsZoningReaderSettingsWrapper
in converterwrappers.py