OpenStreetMapX.jl
OpenStreetMapX.jl copied to clipboard
why not use m.n in the following function get_route_nodes ?
trafficstars
function get_route_nodes(m::OpenStreetMapX.MapData, route_indices::Array{Int64,1})
route_nodes = Array{Int}(undef,length(route_indices))
v = Dict{Int,Int}(reverse.(collect(m.v)))
for n = 1:length(route_nodes)
route_nodes[n] = v[route_indices[n]]
end
return route_nodes
end
In the above function, is the variable v the same as m.n or did I miss something?
Yes you are right.
Identical code is executed where a MapData object is constructed:
https://github.com/pszufe/OpenStreetMapX.jl/blob/919b76412883afd30a98da745219d87ac62383b0/src/parseMap.jl#L128