.is_activated_logging_for_gtfs_route_by_short_name(+)
GtfsServicesReaderSettings method
Description
Verify if a particular GTFS route, by its GTFS shortname, a.k.a. head sign, is marked for extended logging. When True
it is
otherwise it is not.
Signature
.is_activated_logging_for_gtfs_route_by_short_name(gtfs_short_name: str)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
gtfs_short_name |
str |
None |
N/A | GTFS route 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.activate_logging_for_gtfs_route_by_short_name(`123`)
assert gtfs_reader.settings.services_settings.is_activated_logging_for_gtfs_route_by_short_name('123') is True
assert gtfs_reader.settings.services_settings.is_activated_logging_for_gtfs_route_by_short_name('999') is False
See also
N/A
Source code
Class GtfsServicesReaderSettingsWrapper
in converterwrappers.py