Skip to contents

trend_class_area creates area stats for previously generated trend class rasters.

Usage

trend_class_area(irast, iregions, attribname)

Arguments

irast

Character file path to the trend class raster for a distinct period that has been written to the `trend_class\` directory. If multiple periods (and rasters) exist, run this one at a time.

iregions

Character file path to a shapefile (including extension) that defines reporting regions. The shapefile should have an attribute column that defines the overall reporting "region" plus "site", if applicable, such as "NatPark_site1", "NatPark_site2" etc. The underscore delineates region from site.

attribname

Character string of the name of the attribute column that contains the region information.

Value

Calculated areas are exported via csv file to `trend_class\`.

Details

This function is designed to calculate the area of each trend class as defined by using the trend_class per reporting area or site.Reporting areas are defined by input shapefile. Outputs results to csv.

Author

Bart Huntley, bart.huntley@dbca.wa.gov.au

Examples

if (FALSE) { # \dontrun{
trend_class_areas(irast = "trend_class/Test_National_Park_2014-2023_trendclass.tif",
    iregions = "vectors/regions.shp", attribname = "regions")
} # }