.set_station_to_parallel_tracks_search_radius_meters(+)

OsmPublicTransportReaderSettings method

Description

When an OSM station is: (i) not part of a public transport stop area, and (ii) has no nearby platforms it can be related to, then it is considered a stand alone station. A stand alone station lacks any details in OSM on where its platform(s) are, likely due to lack of detail in the OSM map. To still be able to create a station within Planit, we attempt to create the platforms when possible based on the proximity of rail tracks to the OSM station node.

The proximity to look for eligible rail tracks that are most likely locations for platforms, is capped by the radius set in this method. Reducing this distance to too small a value results in missing eligible rail tracks for the station whereas making the search radius too large can cause for false positives in case no actual rail tracks are close enough to be viable stop locations.

Stand alone stations are likely small stations. Therefore, we at most generate two Planit platforms (transfer zones) at the two closest rail tracks within the search distance. Also, these two rail tracks (if they exist) should be roughly parallel, hence the name of this method.

Signature

.set_station_to_parallel_tracks_search_radius_meters(radius_meters: float)

with

Parameter Type Unit Default Description
radius_meters float Meters 35.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_station_to_parallel_tracks_search_radius_meters(50)

See also

N/A

Source code

Class OsmPublicTransportSettingsWrapper in converterwrappers.py