Find nearest node with given conditions

Share:

Description

For a given ID, find nearest node (geographical distance) with given conditions.

Usage

1

Arguments

object

An osmar object

id

An node ID

condition

Condition for the element to find; see find

Value

A node ID or NA

See Also

Other finding: find_down, find_up; find

Examples

1
2
3
4
data("muc", package = "osmar")
  id <- find(muc, node(tags(v == "Marienplatz")))[1]

  find_nearest_node(muc, id, way(tags(k == "highway" & v == "pedestrian")))