Types
LightOSM.OSMGraph
— TypeContainer for storing OpenStreetMap node, way, relation and graph related obejcts.
Fields
U <: Integer,T <: Union{String, Int},W <: Real
nodes::Dict{T,Node{T}}
: Mapping of node ids to node objects.node_coordinates::Vector{Vector{W}}
: Vector of node coordinates [[lat, lon]...], indexed by graph vertices.ways::Dict{T,Way{T}}
: Mapping of way ids to way objects. Previously calledhighways
.node_to_index::OrderedDict{T,U}
: Mapping of node ids to graph vertices.index_to_node::OrderedDict{U,T}
: Mapping of graph vertices to node ids.node_to_way::Dict{T,Vector{T}}
: Mapping of node ids to vector of way ids. Previously callednode_to_highway
.edge_to_way::Dict{Vector{T},T}
: Mapping of edges (adjacent node pairs) to way ids. Previously callededge_to_highway
.restrictions::Dict{T,Restriction{T}}
: Mapping of relation ids to restriction objects.indexed_restrictions::Union{DefaultDict{U,Vector{MutableLinkedList{U}}},Nothing}
: Mapping of via node ids to ordered sequences of restricted node ids.graph::Union{AbstractGraph,Nothing}
: Either DiGraph, StaticDiGraph, SimpleWeightedDiGraph or MetaDiGraph.weights::Union{SparseMatrixCSC{W,U},Nothing}
: Sparse adjacency matrix (weights between graph vertices), either:distance
(km),:time
(hours) or:lane_efficiency
(time scaled by number of lanes).dijkstra_states::Vector{Vector{U}}
: Vector of dijkstra parent states indexed by source vertices, used to retrieve shortest path from source vertex to any other vertex.kdtree::Union{KDTree,Nothing}
: KDTree used to calculate nearest nodes.kdtree::Union{RTree,Nothing}
: R-tree used to calculate nearest nodes.weight_type::Union{Symbol,Nothing}
: Either:distance
,:time
or:lane_efficiency
.
LightOSM.GeoLocation
— TypeRepresentation of a geospatial coordinates.
Fields
lat::Float64
: Latitude.lon::Float64
: Longitude.alt::Float64
: Altitude.
Constructors
GeoLocation(lat, lon)
GeoLocation(point::Vector{<:Real})
GeoLocation(point_vector::Vector{<:Vector{<:Real}})
GeoLocation(g::OSMGraph, ep::EdgePoint)
LightOSM.Node
— TypeOpenStreetMap node.
Fields
T<:String
id::T
: OpenStreetMap node id.nodes::Vector{T}
: Node's GeoLocation.tags::AbstractDict{String,Any}
: Metadata tags.
LightOSM.Way
— TypeOpenStreetMap way.
Fields
T<:Integer
id::T
: OpenStreetMap way id.nodes::Vector{T}
: Ordered list of node ids making up the way.tags::AbstractDict{String,Any}
: Metadata tags.
LightOSM.Restriction
— TypeOpenStreetMap turn restriction (relation).
Fields
T<:String
id::T
: OpenStreetMap relation id.type::String
: Either avia_way
orvia_node
turn restriction.tags::AbstractDict{String,Any}
: Metadata tags.from_way::T
: Incoming way id to the turn restriction.to_way::T
: Outgoing way id to the turn restriction.via_node::Union{T,Nothing}
: Node id at the centre of the turn restriction.via_way::Union{Vector{T},Nothing}
: Way id at the centre of the turn restriction.is_exclusion::Bool
: Turn restrictions such asno_left_turn
,no_right_turn
orno_u_turn
.is_exclusive::Bool
: Turn restrictions such asstriaght_on_only
,left_turn_only
,right_turn_only
.
LightOSM.Building
— TypeOpenStreetMap building.
Fields
T<:String
id::T
: OpenStreetMap building way id a simple polygon, relation id if a multi-polygonis_relation::Bool
: True if building is a a multi-polygon / relation.polygons::Vector{Polygon{T}}
: List of building polygons, first is always the outer ring.tags::AbstractDict{String,Any}
: Metadata tags.
LightOSM.PathAlgorithm
— TypePathAlgorithm.
Abstract type for path finding algorithms:
Dijkstra
AStar