.exclude_gtfs_routes_by_short_name(+)
GtfsServicesReaderSettings method
Description
Use this method to remove specific GTFS routes from parsing.
Signature
.exclude_gtfs_routes_by_short_name(gtfs_routes_by_short_name: List[str])
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
gtfs_routes_by_short_name |
List of str |
None |
N/A | GTFS routes by their GTFs short name to exclude |
Return type
N/A
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>)
## exclude indicated routes ##
gtfs_reader.settings.services_settings.exclude_gtfs_routes_by_short_name([`123`,`124`])
See also
N/A
Source code
Class GtfsServicesReaderSettingsWrapper
in converterwrappers.py