sampleRasterFromPolygons: Sample raster values from polygons

Description Usage Arguments Details Value References

Description

In the default settings, this is just a wrapper arround raster::extract but with additional options in oder to select just a subsample of the extracted raster values based on properties of the size of the polygons. The reason behind this is to be able to use e.g. training polygons for land-cover classifications of very different sizes without running into problems during model delevopment later.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S4 method for signature 'Satellite'
sampleRasterFromPolygons(x, bcde, mask = NULL, ...)

## S4 method for signature 'RasterStack'
sampleRasterFromPolygons(x, poly, nbr = 50,
  res = raster::res(x), ...)

## S4 method for signature 'RasterBrick'
sampleRasterFromPolygons(x, poly, nbr = 50,
  res = raster::res(x), ...)

## S4 method for signature 'RasterLayer'
sampleRasterFromPolygons(x, poly, nbr = NULL, ...)

Arguments

x

Satellite object, raster stack or raster layer.

mask

A raster::RasterLayer in which area of interest are marked with 1, NA otherwise.

Details

The method is a wrapper for raster:extract with some extensions

Value

If x is a Satellite object, a Satellite object with added image textures; if x is a raster::Raster* object, a raster::Raster* object with converted layer(s).

References

None.


environmentalinformatics-marburg/satelliteTools documentation built on May 16, 2019, 8:16 a.m.