Extracts raster data at vector locations.

Share:

Description

Extracts raster data at vector locations.

Usage

1
2
3
4
5
  rstarspan(vectors, rasters,
    outformat = "SpatialDataFrame", borderx = 0,
    bordery = 0, force_window_odd = TRUE,
    miniraster_direction = "vertical",
    miniraster_vector = TRUE, verbose = TRUE, ...)

Arguments

vectors

a vector of superclass "Spatial" or a list of vectors.

rasters

a raster of superclass "Raster" or a list of rasters.

outformat

Character. Can be "SpatialDataFrame" (appends the extracted data to the original Spatial* object) or "DataFrame" (only returns the data.frame portion).

...

See ?extract for parameters (e.g. "fun") that can be used.

borderx

TODO

bordery

TODO

force_window_odd

TODO

miniraster_direction

TODO

miniraster_vector

TODO

verbose

TODO

Note

If the input vector(s) are SpatialPolygonsDataFrame, the user must assign "fun" if outformat="SpatialDataFrame".

Author(s)

Jonathan A. Greenberg STARStools@estarcion.net

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
tahoe_highrez <- brick(system.file("external/tahoe_highrez.tif", package="STARStools"))
tahoe_highrez_training_polygons <- readOGR(dsn=system.file("external", package="STARStools"),layer="tahoe_highrez_training")
tahoe_training_extraction <- rstarspan(vectors=tahoe_highrez_training,rasters=tahoe_highrez,outformat="SpatialDataFrame",fun=mean)
tahoe_highrez_training_points <- readOGR(dsn=system.file("external", package="STARStools"),layer="tahoe_highrez_training_points")
tahoe_training_extraction_minirasterstrip <- rstarspan(vectors=tahoe_highrez_training_points,
rasters=tahoe_highrez,outformat="MiniRasterStrip",borderx=5,bordery=5)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.