project_layers: Project geodata layers

Description Usage Arguments Details Value Examples

View source: R/project_layers.R

Description

project_layers Project layers for plotting

Usage

1
2
project_layers(proj = NULL, extent = c(-108.53, -64.51618, 20.76168,
  52.5362), geodata, crop.raster = TRUE, layers = "all")

Arguments

proj

Projection to use. Otherwise defaults to WGS84, centered on the middle of the extent

extent

a numeric vector of length 4, specifying the ymin, ymax, xmin and xmax bounds of the map

geodata

named list containing geographic data layers. For a layer to be projected and returned, it must have a class of either Raster or Spatial.

crop.raster

logical, should rasters be cropped? Speeds things up a lot.

layers

vector of geodata names to use. Defaults to all.

...

Not currently in use

Details

...

Value

A four column data.table specifying the original and buffered point locations

Examples

1
2
3
4
5
6
7
8
## Not run: 
data("geodata", package = "pvdiv.map")
proj.layers <- project_layers(geodata = geodata)
projection <- proj.layers$projection
proj.layers <- proj.layers$proj.layers
plot(proj.layers[[1]])

## End(Not run)

LovellHAGSC/pvdiv.map documentation built on Nov. 5, 2019, 1:30 p.m.