veg_class
performs a raster reclassification based on a user supplied
set of meaningful bins.
Arguments
- irast
Character file path to input veg density rasters that have been through the masking process, i.e. those that are found in `veg_dens_mskd\` or `veg_dens_mskd_cld\`.
- ext
Character representation of the file extension of the input rasters. Defaults to ".tif" as this is the preferred file type.
- classes
Character string of the name of the density classes csv file including file path. Defaults to "./supplementary/density_classes.csv" which works with the suggested project folder structure and workflow.
Details
This function is designed to take the continuous values, in say a raster of vegetation densities, and convert them to numeric classes based on some prior determination. The user must supply a csv of density classes with the following three column format so that each row forms a bin:
lower - numerical low value for bin
upper - numerical high value (<=) for bin
reclass - numerical classification value
The numerical classification can take any single integer value except
6. The integer 6 is reserved for any values that had a masked value of -99
created by using "link{cloud_mask}
.
The function will perform some "probable" values classification in those areas that are masked with a -99 value. It will identify the same pixels in the previous year's raster and return those classified values plus 10. The reasoning here is that those pixels possibly would not have changed density but they can still be identified and removed (e.g. any value > 10) in downstream analysis.
Author
Bart Huntley, bart.huntley@dbca.wa.gov.au