.set_include_partial_gtfs_trips_if_stops_in_time_period(+)

GtfsServicesReaderSettings method

Description

Use this method to activate the inclusion of GTFS routes that depart outside the time period that we are parsing for but at least part of the stops are found to reside within the specified time window. When True the portion of these routes that falls within the time period will be included, otherwise they are excluded altogether.

Signature

.set_include_partial_gtfs_trips_if_stops_in_time_period(flag: bool)

with

Parameter Type Unit Default Description
flag str bool True When True include partial routes, 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>)

## explicitly activate inclusion of partial routes w.r.t. to time period filter ##
gtfs_reader.settings.services_settings.set_include_partial_gtfs_trips_if_stops_in_time_period(True)

See also

N/A

Source code

Class GtfsServicesReaderSettingsWrapper in converterwrappers.py