Open bsnyh opened 5 years ago
Hi,
In the most basic scenario, when you use features from the osm file you don't need to bother yourself with this function, features are already nodes. Hovewer, when you want to use the features from the outside file (e.g. you got some special list of objects necessary in your model) or filter the roads (e.g. you only interested in having highways) then it might be quite useful. The code is here
Hi, bartoszpankratz, Great! Thank you a lot. You mean the code is as the following, right?
function nearest_node(m::MapData, loc::ENU, vs_only::Bool=true)
vs_only ? nearest_node(m.nodes,loc, keys(m.v)) : nearest_node(m.nodes,loc)
end
Yeah, that's right. My mistake.
Or am I wrong also? The features
parameter in the function features_to_graph
is a Dict{Int,Tuple{String,String}}
......
Ok, sorry. I have changed a lot, someone mess around with this function and no one have update it. I remeber that at the beginning this function was written to work with external data sources, like CSV files, thats the reason why features are Dict{Int,Tuple{String,String}} - Tuple{String,String} was the pair of coordinates which then was translated to LLA type. Thank you! We will repair it obviously.
Hi, I hope that I did not misunderstand anything. I was a bit confused about the following code.
Firstly, what is exactly "for each feature, find the nearest graph node"? What does it mean? Secondly, where to find this function
OpenStreetMapX.nearest_node(m, features[key])
?