.set_default_directional_railway_tracks(+)

OsmLaneConfiguration method

Description

Override the default number of tracks per direction for all OSM railway types. This default is only applied when no explicit number of tracks is provided on the OSM way itself.

The default for each railway type is 1 (in either direction). this implies two tracks per railway, but from a modellnig perspective this is indeed the case since the tracks can be used in both directions unless indicated otherwise

Signature

.set_default_directional_railway_tracks(number_of_tracks_dir:int)

with

Parameter Type Unit Default Description
number_of_tracks_dir int Type dependent N/A New default to apply (per direction)

Return type

N/A

Example 1

from planit import *

# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)

# example Open Street Map (OSM) network reader        
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")

# update default number of lanes for all rail to 2, i.e., 4 for two directions
osm_reader.settings.lane_configuration.set_default_directional_railway_tracks(2)

See also

N/A

Source code

Class ReaderSettingsWrapper in converterwrappers.py