GtfsZoningReaderSettings

GtfsZoningReaderSettings instance

The GtfsZoningReaderSettings are accessible via the GtfsIntermodalReaderSettings.zoning_settings property. These settings are specific to the configuration of parsing public transport infrastructure (GTFS stops) provided in the GTFS dataset. GTFS stops represent poles, platforms, and or stations

During parsing these GTFS stops are converted into PLANit transfer zones or matched to existing transfer zones.

Methods

A GtfsZoningReaderSettings instance exposes the following methods.

Name Default Description
.activate_extended_logging_for_gtfs_zones(+) N/A Activate extended logging for given GTFS stops
.add_log_gtfs_stop_to_link_mapping(+) N/A Explicitly log the mapping that was applied from a given GTFS stop to the underlying link in the network
.add_overwrite_gtfs_stop_transfer_zone_mapping(+) N/A Explicitly provide mapping between GTFS stop and existing/expected PLANit transfer zone
.disallow_gtfs_stop_to_transfer_zone_joint_mapping(+) N/A Disallow mapping a GTFS stop to a particular (pre)existing PLANit transfer zone
.exclude_gtfs_stops_by_id(+) N/A Exclude GTFS stops from parsing by their GTFS stop id
.force_create_new_transfer_zone_for_gtfs_stops(+) N/A Force create a new PLANit transfer zone for GTFS stop even if it can be matched to existing transfer zone
.get_overwritten_gtfs_stop_location(+) N/A Get the overwritten location for the given GTFS stop (if any)
.get_gtfs_stop_to_transfer_zone_search_radius_meters() 40.0 (m) Get the default search radius for GTFS stops to identify potential existing transfer zones to match to
.get_overwritten_gtfs_stop_transfer_zone_mapping(+) N/A Get the explicit mapping between GTFS stop and existing/expected PLANit transfer zone (if it exists)
.get_overwritten_gtfs_stop_to_link_mapping(+) N/A Get the overridden mapping for the GTFS stop to its stop location, i.e., link mapping
.has_overwritten_gtfs_stop_to_link_mapping(+) N/A Verify if force override exists for the GTFS stop to its stop location, i.e., link mapping
.is_disallow_gtfs_stop_to_transfer_zone_joint_mapping(+) N/A Verify if mapping between a GTFS stop and a particular (pre)existing PLANit transfer zone is disallowed
.is_excluded_gtfs_stop(+) N/A Verify if a GTFS stop is excluded from parsing by its GTFS stop id
.is_extended_logging_for_gtfs_zone_activated(+) N/A Verify if extended logging for given GTFS stop is activated
.is_log_created_gtfs_zones() N/A Verify if the reader is logging all GTFS stops not mapped to a pre-existing PLANit transfer zone
.is_log_mapped_gtfs_zones() N/A Verify if the reader is logging all GTFS stops mapped to a pre-existing PLANit transfer zone
.is_overwritten_gtfs_stop_location(+) N/A Verify if the location of the GTFS stop is manually overwritten
.is_overwritten_gtfs_stop_transfer_zone_mapping(+) N/A Verify if explicit mapping between GTFS stop and existing/expected PLANit transfer zone exists
.overwrite_gtfs_stop_to_link_mapping(+) N/A Force override the GTFS stop to its stop location, i.e., link mapping
.set_gtfs_stop_to_transfer_zone_search_radius_meters(+) 40.0 (m) Override the default search radius for GTFS stops to identify potential existing transfer zones to match to
.set_log_created_gtfs_zones(+) N/A Activate logging all GTFS stops that were not mapped to a pre-existing PLANit transfer zone
.set_log_mapped_gtfs_zones(+) N/A Activate logging all GTFS stops that were mapped to a pre-existing PLANit transfer zone
.set_overwrite_gtfs_stop_location(+) N/A Manually override the location of the GTFS stop
.set_remove_unused_transfer_zones(+) N/A Indicate to remove any unused (created) transfer zones (stops) from the result

Properties

N/A

Example 1

from planit import *

# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)

# Network reader to use to impose GTFS on:
#   Open Street Map (OSM) intermodal reader        
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "Australia")
osm_reader.settings.set_input_file(SYDNEY_OSM_PBF_FILE_PATH)

# GTFS reader
gtfs_reader: GtfsIntermodalReaderWrapper = \
    intermodal_converter.create_reader(IntermodalReaderType.GTFS, "Australia", osm_reader)
gtfs_reader.settings.set_input_file(SYDNEY_GTFS_FILE_PATH)

# zoning settings properties
gtfs_reader.settings.zoning_settings.set_gtfs_stop_to_transfer_zone_search_radius_meters = 30.0

# services settings properties
gtfs_reader.settings.services_settings.day_of_week = DayOfWeek.THURSDAY
gtfs_reader.settings.services_settings.add_time_period_filter(
    datetime.time(hour=6, minute=0, second=0),
    datetime.time(hour=9, minute=59, second=59)
)

# PLANit writer
planit_writer = intermodal_converter.create_writer(IntermodalWriterType.PLANIT)
planit_writer.settings.set_output_directory(OUTPUT_PATH)
planit_writer.settings.set_country("Australia")

# perform conversion (with services)
intermodal_converter.convert_with_services(gtfs_reader, planit_writer)

See also

GtfsIntermodalReaderSettings parent settings class

Source code

Class GtfsZoningReaderSettingsWrapper in converterwrappers.py


.activate_extended_logging_for_gtfs_zones(+)

GtfsZoningReaderSettings method

.add_log_gtfs_stop_to_link_mapping(+)

GtfsZoningReaderSettings method

.add_overwrite_gtfs_stop_transfer_zone_mapping(+)

GtfsZoningReaderSettings method

.disallow_gtfs_stop_to_transfer_zone_joint_mapping(+)

GtfsZoningReaderSettings method

.exclude_gtfs_stops_by_id(+)

GtfsZoningReaderSettings method

.force_create_new_transfer_zone_for_gtfs_stops(+)

GtfsZoningReaderSettings method

.get_gtfs_stop_to_transfer_zone_search_radius_meters()

GtfsZoningReaderSettings method

.get_overwritten_gtfs_stop_to_link_mapping(+)

GtfsZoningReaderSettings method

.get_overwritten_gtfs_stop_transfer_zone_mapping(+)

GtfsZoningReaderSettings method

.has_overwritten_gtfs_stop_to_link_mapping(+)

GtfsZoningReaderSettings method

.is_disallow_gtfs_stop_to_transfer_zone_joint_mapping(+)

GtfsZoningReaderSettings method

.is_excluded_gtfs_stop(+)

GtfsZoningReaderSettings method

.is_extended_logging_for_gtfs_zone_activated(+)

GtfsZoningReaderSettings method

.is_log_created_gtfs_zones()

GtfsZoningReaderSettings method

.is_log_mapped_gtfs_zones()

GtfsZoningReaderSettings method

.is_overwritten_gtfs_stop_location(+)

GtfsZoningReaderSettings method

.is_overwritten_gtfs_stop_transfer_zone_mapping(+)

GtfsZoningReaderSettings method

.overwrite_gtfs_stop_to_link_mapping(+)

GtfsZoningReaderSettings method

.set_gtfs_stop_to_transfer_zone_search_radius_meters(+)

GtfsZoningReaderSettings method

.set_log_created_gtfs_zones(+)

GtfsZoningReaderSettings method

.set_log_mapped_gtfs_zones(+)

GtfsZoningReaderSettings method

.set_overwrite_gtfs_stop_location(+)

GtfsZoningReaderSettings method

.set_remove_unused_transfer_zones(+)

GtfsZoningReaderSettings method