load_osm_data: Download OSM data, store it and and return as sf object

Description Usage Arguments Value Examples

Description

Wrapper function for osm_to_sf that creates a unique file name from the passed parameters, downloads the requested data if necessary and returns the resulting sf object.

Usage

1
2
load_osm_data(bbox, crs, geom_type, key, value, clip_by_outline,
  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.

clip_by_outline

(optional) city name based on which the outline should be cut.

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
12
## Not run: 
# London
bb <- c (-0.90, 51.30, 0.0, 51.40)
crs <- 32630
geom_type <- "osm_points"
key <- "highway"
value <- "bus_stop"
clip_by <- "London"

bus_stops <- load_osm_data (bb, crs, geom_type, key, value, clip_by)

## End(Not run)

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