@@ -132,7 +132,10 @@ Container for storing OpenStreetMap node, way, relation and graph related obejct
132132- `kdtree::Union{RTree,Nothing}`: R-tree used to calculate nearest nodes.
133133- `weight_type::Union{Symbol,Nothing}`: Either `:distance`, `:time` or `:lane_efficiency`.
134134"""
135- @with_kw mutable struct OSMGraph{U <: Integer ,T <: Union{Integer, String} ,W <: Real }
135+
136+
137+ abstract type AbstractOSMGraph end
138+ @with_kw mutable struct OSMGraph{U <: Integer ,T <: Union{Integer, String} ,W <: Real } <: AbstractOSMGraph
136139 nodes:: Dict{T,Node{T}} = Dict {T,Node{T}} ()
137140 node_coordinates:: Vector{Vector{W}} = Vector {Vector{W}} () # needed for astar heuristic
138141 ways:: Dict{T,Way{T}} = Dict {T,Way{T}} ()
@@ -164,8 +167,9 @@ function Base.getproperty(g::OSMGraph, field::Symbol)
164167 else
165168 return getfield (g, field)
166169 end
170+ end
167171
168- struct SimplifiedOSMGraph{U <: Integer , T <: Union{Integer, String} , W <: Real }
172+ struct SimplifiedOSMGraph{U <: Integer , T <: Union{Integer, String} , W <: Real } <: AbstractOSMGraph
169173 parent:: OSMGraph{U,T,W}
170174 node_coordinates:: Vector{Vector{W}} # needed for astar heuristic
171175 node_to_index:: OrderedDict{T,U}
0 commit comments