.set_group_identical_gtfs_trips(+)

GtfsServicesReaderSettings method

Description

Allow to group trips that have identical stop patterns within a GTFS route (service), but different departure times. When this is activated, the reader will collate these trips in a single schedule, where the departure times are combined into a single schedule of consolidated departure times.

Signature

.set_group_identical_gtfs_trips(flag: bool)

with

Parameter Type Unit Default Description
flag bool None True When True group identical trips, otherwise do not

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

## Switch off automatic grouping of routes with identical stopping patterns ##
gtfs_reader.settings.services_settings.set_group_identical_gtfs_trips(False)

See also

N/A

Source code

Class GtfsServicesReaderSettingsWrapper in converterwrappers.py