.exclude_osm_ways_from_parsing(+)

OsmNetworkReaderSettings method

Description

Option to exclude specific osm ways from parsing. To do so the osm way id must be provided. Typically this would be done when there are issues with the tagging that are reported by the parser in an earlier run.

One can check the location and tags of an OSM way very easily via any browser through https://www.openstreetmap.org/way/

Signature

.exclude_osm_ways_from_parsing(osm_way_ids)

with

Parameter Type Unit Default Description
osm_way_ids List of Long None N/A Explicitly excluded osm ways from parsing

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

# Exclude a road from parsing
osm_reader.exclude_osm_ways_from_parsing([715380193])

See also

N/A

Source code

Class OsmNetworkReaderSettingsWrapper in converterwrappers.py