Returns the mean value of a given raster band across a polygon.

read_band(poly, dir, band)

Arguments

poly

is a spatial polygon object

dir

is a directory of raster files

band

is a number specifying the desired raster band

Value

the mean values of the raster band masked by the polygon