R: Find nearest node with given conditions

find_nearest_node {osmar} | R Documentation

## Find nearest node with given conditions

### Description

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

### Usage

      find_nearest_node(object, id, condition)

### 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`, `find_down`, `find_up`

### Examples

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

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

[Package osmar version 1.1-7 Index]