View source: R/spatial_utilities.R
extract_raster_prop | R Documentation |
Given a set of locations and a raster, this function will
calculate the proportion of each landcover class specified in the
argument lulc_cats
.
extract_raster_prop(
my_points,
location_column,
my_buffer,
my_raster_data,
lulc_cats = NULL
)
my_points |
a spatial points data.frame that contains the locations you wish to summarize landcover data at. |
location_column |
the name of the column in |
my_buffer |
The radius of a buffer around each point form which |
my_raster_data |
A SpatRaster object that you want to extract data from. |
lulc_cats |
Land-use land-cover categories. If this is a numeric then the data will be queried to return just those specific lulc categories (e.g., lulc_cats = c(1,2)) will return the first two categories. If this is a list then each element must be a numeric vector. If the numeric vector is > 1 for a specific list element then those categories will be summed together. This may be done to combine specific similar category types (e.g., combine 'building', 'road', and 'other paved surfaces') to generate an impervious surface category. The numeric or the list can be named. If they are then those names will be added to the returned object. If NULL, then all categories will be returned. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.