Title: | Projecting Satellite-Derived Phenology in Space |
---|---|
Description: | This takes in a series of multi-layer raster files and returns a phenology projection raster, following methodologies described in John (2016) <https://etda.libraries.psu.edu/catalog/13521clj5135>. |
Authors: | Christian John [aut, cre] |
Maintainer: | Christian John <[email protected]> |
License: | GPL-3 |
Version: | 2.0.1 |
Built: | 2025-03-05 03:31:30 UTC |
Source: | https://github.com/jepsonnomad/phenomap |
Convert a series of raster files to a single phenology raster.
mapPheno( File_List = NA, PhenoFactor = NA, phase = NA, threshold = NA, year = NA, NDVI = NA, VIQ = NA, DOY = NA, PR = NA, SnowExtent = NA, verbose = FALSE )
mapPheno( File_List = NA, PhenoFactor = NA, phase = NA, threshold = NA, year = NA, NDVI = NA, VIQ = NA, DOY = NA, PR = NA, SnowExtent = NA, verbose = FALSE )
File_List |
List of raster files |
PhenoFactor |
Character string; type of dataset to analyze (e.g., "VI", "Snow") |
phase |
Character string; name of phenophase to be measured (e.g., "greenup", "snowmelt", "senescence" or other arguments passed to phenex::phenophase()) |
threshold |
Float threshold GWI value to be projected. Use only for VI option. |
year |
Integer Year (YYYY) |
NDVI |
Integer Band number of NDVI band in raster files |
VIQ |
Integer Band number of VI Quality layer in raster files |
DOY |
Integer Band number of Composite Day of Year layer in raster files |
PR |
Integer Band Number of PR layer in raster files |
SnowExtent |
Integer Band number of Maximum_Snow_Extent in raster files |
verbose |
TRUE or FALSE (Default = FALSE) |
Raster object with extent=extent(terra::rast(File_List)[1]) and CRS = crs(terra::rast(File_List)[1]). Digital numbers are expressed as Day of Year.
## Not run: fpath <- system.file("extdata", package="phenomap") File_List <- paste(fpath, list.files(path = fpath, pattern=c("TinyCrop_")), sep="/") File_List PhenoFactor = "VI" phase = "greenup" threshold = 0.5 year = 2016 NDVI = 1 VIQ = 3 DOY = 4 PR = 5 verbose = TRUE Sample.Greenup <- mapPheno(File_List = File_List, PhenoFactor = PhenoFactor, phase = phase, threshold = threshold, year = year, NDVI = NDVI, VIQ = VIQ, DOY = DOY, PR = PR, SnowExtent=SnowExtent, verbose = verbose) ## End(Not run)
## Not run: fpath <- system.file("extdata", package="phenomap") File_List <- paste(fpath, list.files(path = fpath, pattern=c("TinyCrop_")), sep="/") File_List PhenoFactor = "VI" phase = "greenup" threshold = 0.5 year = 2016 NDVI = 1 VIQ = 3 DOY = 4 PR = 5 verbose = TRUE Sample.Greenup <- mapPheno(File_List = File_List, PhenoFactor = PhenoFactor, phase = phase, threshold = threshold, year = year, NDVI = NDVI, VIQ = VIQ, DOY = DOY, PR = PR, SnowExtent=SnowExtent, verbose = verbose) ## End(Not run)
Convert a series of phenology terra::raster files to a single long-term trend terra::raster.
mapTrend( File_List, Year_List, parallel = FALSE, n.cores = NULL, verbose = FALSE )
mapTrend( File_List, Year_List, parallel = FALSE, n.cores = NULL, verbose = FALSE )
File_List |
List of phenology terra::raster files (i.e. those produced in 'mapPheno') |
Year_List |
Vector of Integer Year (YYYY) with length > 5 |
parallel |
TRUE or FALSE (Default = FALSE) if TRUE, use parallel backend through plyr::aaply |
n.cores |
Integer number of cores to be used for parallel processing (only use if parallel = TRUE) |
verbose |
TRUE or FALSE (Default = FALSE) |
terra::raster object with extent=ext(rast(File_List)[1]) and CRS = crs(rast(File_List)[1]). Layer 1 is the slope estimate of the linear model relating green-up timing (Day of Year) to time (Year). Layer 2 is the p-value of the slope estimate. Layer 3 is the standard error of the slope estimate. Layer 4 is the r-squared value for the linear model.
## Not run: fpath <- system.file("extdata", package="phenomap") File_List.Trend <- paste(fpath, list.files(path = fpath, pattern=c("Sample_Greenup_")), sep="/") Year_List <- 2011:2016 # Tell it what years you're using n.cores <- 4 # Set up parallel computing phenotrend <- mapTrend(File_List = File_List.Trend, Year_List = Year_List, parallel = TRUE, n.cores = n.cores, verbose=TRUE) ## End(Not run)
## Not run: fpath <- system.file("extdata", package="phenomap") File_List.Trend <- paste(fpath, list.files(path = fpath, pattern=c("Sample_Greenup_")), sep="/") Year_List <- 2011:2016 # Tell it what years you're using n.cores <- 4 # Set up parallel computing phenotrend <- mapTrend(File_List = File_List.Trend, Year_List = Year_List, parallel = TRUE, n.cores = n.cores, verbose=TRUE) ## End(Not run)