find_nearest_node: Find nearest node with given conditions

Description Usage Arguments Value See Also Examples

View source: R/osmar-finding.R

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")))

osmar documentation built on May 31, 2017, 3:49 p.m.

Search within the osmar package
Search all R packages, documentation and source code