OsmPublicTransportSettings

OsmPublicTransportSettings instance

The OsmPublicTransportSettings are accessible via the OsmIntermodalReaderSettings.pt_settings property. These settings are specific to the public transport infrastructure (not lines and services yet) of the network such as bus stops, train platforms, and stations.

During parsing these public transport OSM entities are converted into Planit Transfer zones (locations where modes can transfer, e.g. stations, stops), connectoids (where interaction between network agnostic zones and a physical network takes place, e.g. vehicle stop positions). Transfer zones, connectoids etc. are part of the Planit Zoning.

Public transport Terminology

In the exposed methods we use certain terminology to indicate OSM entities (or groups). To avoid confusion the most common terms used are listed below:

  • OSM way: typically an OSM highway or OSM railway, but technically represents any line or polygon shape in an OSM file
  • OSM waiting area: represents any physical infrastructure where travelers might wait to board a public transport mode, e.g. bus pole, platform, station. A waiting area is generally not located on road infrastructure.
  • OSM stop(position): represents a location where pt modes stop to let travellers ingress/egress towards a waiting area. A stop position is generally located on road infrastructure
  • OSM stop area: represents a relation containing one or more OSM entities including for example stop positions, waiting area, but also pt lines

In Planit terminology, an OSM way equates to a link(segment), an OSM waiting area equates to a transfer zone, while a stop(position) equates to a connectoid. Lasltly OSM stop areas equate to transfer zone groups although transfer zone groups simply group multiple transfer zones and do not include pt services or stop positions (explicitly).

Methods

A OsmPublicTransportSettings instance exposes the following methods.

Name Default Description
.exclude_osm_nodes_by_id(+) N/A Exclude OSM nodes by their OSM id, so they are not parsed anymore (as public transport infrastructure), e.g. bus stop poles, stand alone stations, etc.
.exclude_osm_ways_by_id(+) N/A Exclude OSM ways by their OSM id, so they are not parsed anymore (as public transport infrastructure), e.g. platforms, platform edges, etc.
.overwrite_stop_location_waiting_area(+) N/A Explicitly map stop locations to a particular OSM waiting area, overriding existing OSM mapping, or the automated procedure in the reader. Useful in case of tagging errors
.overwrite_waiting_area_nominated_osm_way_for_stop_location(+) N/A Explicitly map a OSM waiting area to find or create a stop location on the nominated OSM way. Useful in case of tagging errors
.set_remove_dangling_transfer_zone_groups(+) True Indicate if dangling zone groups, i.e., transfer zone groups without transfer zones are to be removed after the reader has completed
.set_remove_dangling_zones(+) True Indicate if dangling zones, i.e., created transfer zones without connectoids are to be removed after the reader has completed
.set_station_to_waiting_area_search_radius_meters(+) 35 (m) Set the search radius to search for OSM waiting areas (platforms) around an OSM station if it is not part of an OSM stop area
.set_stop_to_waiting_area_search_radius_meters(+) 25 (m) Set the search radius to search for OSM stop positions around an OSM waiting area if no explicit mapping is available
.set_station_to_parallel_tracks_search_radius_meters(+) 35 (m) Set the search radius to search for parallel rail tracks around a stand-alone OSM station, i.e., without any nearby platforms nor part of stop area

Properties

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

# configure something on the OSM pt settings
osm_reader.settings.pt_settings.<some_method>

# example Planit intermodal writer
planit_writer = intermodal_converter.create_writer(IntermodalReaderType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
planit_writer.settings.set_country("<country_name>")

# perform conversion
intermodal_converter.convert(reader,writer)

See also

IntermodalReaderSettings parent settings class

Source code

Class OsmPublicTransportSettingsWrapper in converterwrappers.py


.exclude_osm_nodes_by_id(+)

OsmPublicTransportReaderSettings method

.exclude_osm_ways_by_id(+)

OsmPublicTransportReaderSettings method

overwrite_stop_location_waiting_area.(+)

OsmPublicTransportReaderSettings method

.overwrite_waiting_area_nominated_osm_way_for_stop_location(+)

OsmPublicTransportReaderSettings method

.set_remove_dangling_transfer_zone_groups(+)

OsmPublicTransportReaderSettings method

.set_remove_dangling_zones(+)

OsmPublicTransportReaderSettings method

.set_station_to_parallel_tracks_search_radius_meters(+)

OsmPublicTransportReaderSettings method

.set_station_to_waiting_area_search_radius_meters(+)

OsmPublicTransportReaderSettings method

.set_stop_to_waiting_area_search_radius_meters(+)

OsmPublicTransportReaderSettings method

Last modified January 1, 0001