.disallow_gtfs_stop_to_transfer_zone_joint_mapping(+)

GtfsZoningReaderSettings method

Description

Indicate for which GTFS stops only a single mapping to an (existing) transfer zone is allowed. this means that in case a transfer zone has already been mapped to a GTFS stop, we do not created a joint mapping where both GTFS stops are mapped to the same transfer zone. Instead, a separate new transfer zone will be created for the last matched GTFS stop.

The algorithm will log information on which transfer zones are mapped to multiple GTFS stops to allow the user to disallow this in an easy manner of so desired.

Signature

.disallow_gtfs_stop_to_transfer_zone_joint_mapping(gtfs_stop_ids: List[str])

with

Parameter Type Unit Default Description
gtfs_stop_ids List of str N/A N/A GTFS stop ids to disallow a joint mapping

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

## disallow for given GTFS stop ids to be mapped to the same transfer zone##
gtfs_reader.settings.zoning_settings.disallow_gtfs_stop_to_transfer_zone_joint_mapping(
    ["gtfs_stop_id_9", "gtfs_stop_id_10"])
           

See also

N/A

Source code

Class GtfsZoningReaderSettingsWrapper in converterwrappers.py