View source: R/aggregate_grid_to_polygons.R
aggregate_raster_to_polygons_validation | R Documentation |
Data validation for aggregate_raster_to_polygons
aggregate_raster_to_polygons_validation(
data_raster,
aggregation_table,
aggregation_cols,
method,
aggregated_field,
z_dimension,
z_dimension_name,
weighting_raster,
na.rm
)
data_raster |
terra::SpatRaster containing data to be aggregated to polygons. |
aggregation_table |
Aggregation table linking pixels to polygon identifiers,
created using |
aggregation_cols |
(character vector, default 'polygon_id') Polygon identifiers to use for aggregation. |
method |
(character, default 'mean') Aggregation method: one of 'mean', 'sum', 'weighted.mean', or 'weighted.sum'. |
aggregated_field |
(character, default 'data') Name of the aggregated raster values in the output table. |
z_dimension |
(vector, default NULL) If passing a |
z_dimension_name |
(default 'z') The field name for the "z" dimension
corresponding to each layer of the |
weighting_raster |
(terra::SpatRaster, default NULL) The relative weighting of each whole pixel to the overall polygon value, for example, if calculating a population-weighted mean. |
na.rm |
(bool, default TRUE) How to handle NA pixels in |
Errors if checks fail; silently passes if checks pass
aggregate_raster_to_polygons
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.