.is_railway_parser_active()

OsmNetworkReaderSettings method

Description

Verify if the railway parser is active. When activated the parser will consider all activated OSM railway types, when deactivated it considers none of them.

By default, the railway parser is deactivated (unless part of an intermodal reader). This call is delegated to the same method in .railway_settings.

Signature

.is_railway_parser_active()-> bool

Return type

bool

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

# Verify state
assert osm_reader.settings.is_railway_parser_active() is False

See also

.activate_railway_parser(+)

Source code

Class OsmNetworkReaderSettingsWrapper in converterwrappers.py