get_raster_val_classes: Get raster frequency per class from polygon input areas

get_raster_val_classesR Documentation

Get raster frequency per class from polygon input areas

Description

Get the frequency per class of raster values represented in the input raster dataset when restricted to the input watershed polygons for a target city. This ignores NA.

Usage

get_raster_val_classes(raster_object, polygon)

Arguments

raster_object

character. An object of class RasterLayer.

polygon

character. A polygon to define spatial boundary of raster value counts (e.g. a given city's watersheds)

Value

table of crop types present and their frequency of occurrence

Author(s)

Chris R. Vernon (chris.vernon@pnnl.gov)


JGCRI/rgis documentation built on July 27, 2023, 1:47 p.m.