OsmEntityType.<enum>
OsmEntityType types
Description
Class exposing the available OSM entity types. These types can be used to be combined with an OSM id to uniquely identify an OSM entity because OSM ids are only unique within there respective entity type
Fields
<enum> Fields | Description | Instance documentation |
---|---|---|
NODE |
OSM node (can be a node on a road, rail, bus stop, station, tree, etc.) | N/A |
WAY |
OSM way (can be a road, platform, building, etc.) | N/A |
RELATION |
OSM relation (groups nodes, ways, relatinos) | 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>")
# Map stop location 1234 to OSM waiting area (which is a way, i.e. likely a platform) 56789
osm_reader.settings.pt_settings.overwrite_stop_location_waiting_area(1234,OsmEntityType.WAY,56789)
# Map stop location 4321 to OSM waiting area (which is a node, i.e. likely a bus stop) 9876
osm_reader.settings.pt_settings.overwrite_stop_location_waiting_area(4321,OsmEntityType.WAY,9876)
See also
N/A
Source code
Class OsmEntityType
in enums.py