| ox_nearest_nodes | R Documentation |
Returns the osmid of the graph node closest (in planar distance) to each
supplied coordinate.
ox_nearest_nodes(g, x, y)
g |
An osm_graph. |
x, y |
Numeric vectors of coordinates in the graph's CRS. |
An integer/numeric vector of node osmids, one per input point.
g <- example_osm_graph()
ox_nearest_nodes(g, x = 0, y = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.