.set_stop_to_waiting_area_search_radius_meters(+)

OsmPublicTransportReaderSettings method

Description

In OSM, a waiting area is generally not located on the road/rail infrastructure but beside it. To determine what road/rail/line it services, a stop location is required. This stop location can be explicitly referenced by the waiting area or not. If this is not the case OSM guidelines dictate that the stop_location is expected to be at the “nearest OSM node” part of a nearby mode compatible road/rail way.

To avoid having to consider the entire network when parsing in absence of an explicit reference the search radius is truncated and this radius can be altered via this method. The larger the radius the more computationally costly the parsing becomes, the smaller the radius the larger the risk a viable stop_location cannot be found.

Signature

.set_stop_to_waiting_area_search_radius_meters(radius_meters: float)

with

Parameter Type Unit Default Description
radius_meters float Meters 25.0 Desired search radius in meters

Return type

N/A

Example 1

from planit import *

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

# example Open Street Map (OSM) intermodal reader        
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")

# Increase the search radius to 50 meters
osm_reader.settings.pt_settings.set_stop_to_waiting_area_search_radius_meters(50)

See also

N/A

Source code

Class OsmPublicTransportSettingsWrapper in converterwrappers.py