Learn R Programming

bcmaps (version 1.0.3)

get_layer: Get a B.C. spatial layer

Description

Get a B.C. spatial layer

Usage

get_layer(layer, class = c("sf", "sp"), ask = TRUE, force = FALSE, ...)

Value

the layer requested

Arguments

layer

the name of the layer. The list of available layers can be obtained by running available_layers()

class

what class you want the object in? "sf" (default) or "sp".

ask

Should the function ask the user before downloading the data to a cache? Defaults to the value of interactive().

force

Should you force download the data?

...

arguments passed on to get_big_data if the layer needs to be downloaded from a bcmapsdata release.

Examples

Run this code
if (FALSE) {
 get_layer("bc_bound_hres")

 # As a "Spatial" (sp) object
 get_layer("watercourses_15M")
}

Run the code above in your browser using DataLab