osm_to_sf: Download OSM data and return as sf object

Description Usage Arguments Value Examples

Description

Download OSM data with specified parameters and return sf object.

Usage

1
osm_to_sf(bbox, crs, geom_type, key, value, timeout = 25)

Arguments

bbox

vector of corner coordinates of the area to download.

crs

output coordinate reference system.

geom_type

OSM geometry type.

key

OSM key to download.

value

OSM value to download.

timeout

(optional) overpass timeout time in seconds.

Value

sf object of downloaded data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# London
bb <- c (-0.90, 51.30, 0.0, 51.40)
crs <- 32630
geom_type <- "osm_points"
key <- "highway"
value <- "bus_stop"

bus_stops <- osm_to_sf (bb, crs, geom_type, key, value)

## End(Not run)

karpfen/spaceplace documentation built on May 24, 2019, 7:34 a.m.