.is_log_gtfs_stop_route(+)

GtfsServicesReaderSettings method

Description

Verify if a particular GTFS stop, by its GTFS stop id, is marked for logging any routes that stop at it. When True it is otherwise it is not.

Signature

.is_log_gtfs_stop_route(gtfs_stop_id: str)

with

Parameter Type Unit Default Description
gtfs_stop_id str None N/A GTFS stop to verify

Return type

bool (True or False)

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

## test for route inlusion ##
gtfs_reader.settings.services_settings.add_log_gtfs_stop_routes([`11234587`,`9976342`])
assert gtfs_reader.settings.services_settings.is_log_gtfs_stop_route('11234587') is True
assert gtfs_reader.settings.services_settings.is_log_gtfs_stop_route('55555555') is False

See also

N/A

Source code

Class GtfsServicesReaderSettingsWrapper in converterwrappers.py