Learn R Programming

osmdata (version 0.2.5)

osm_points: Extract all osm_points from an osmdata object

Description

Extract all osm_points from an osmdata object

Usage

osm_points(dat, id)

Value

An sf Simple Features Collection of points

Arguments

dat

An object of class osmdata

id

OSM identification of one or more objects for which points are to be extracted

See Also

Other search: osm_lines(), osm_multilines(), osm_multipolygons(), osm_polygons()

Examples

Run this code
if (FALSE) {
tr <- opq ("trentham australia") %>% osmdata_sf ()
coliban <- tr$osm_lines [which (tr$osm_lines$name == "Coliban River"), ]
pts <- osm_points (tr, rownames (coliban)) # all points of river
# the waterfall point:
waterfall <- pts [which (pts$waterway == "waterfall"), ]
}

Run the code above in your browser using DataLab