| find_nearest_node {osmar} | R Documentation |
For a given ID, find nearest node (geographical distance) with given conditions.
find_nearest_node(object, id, condition)
object |
An |
id |
An node ID |
condition |
Condition for the element to find; see
|
A node ID or NA
Other finding: find,
find_down, find_up
data("muc", package = "osmar")
id <- find(muc, node(tags(v == "Marienplatz")))[1]
find_nearest_node(muc, id, way(tags(k == "highway" & v == "pedestrian")))