Description Usage Arguments Details Value Author(s) Examples
This function performances spatial accuracy assessment of change detection results by comparing the date of change for validation data and the date of change from change detection algorithm. See the usage example
1 2 3 4 5 |
x |
A data frame containing the date for change as per validation data and the date of change from Algorithm.The date for validation data and that of change results from algorithm must be in different columns, and the date must be specified as decimal date e.g. 2015.467. At the location where no change occured and detected, the sample point must be allocated one common unique value. |
NoDataValue |
Numeric or character. A unique value allocated to sample points where no change occured or detected. It can be NA, for example |
EarlyDateIsCommission |
Logical. If TRUE, change detected earlier than the date from the validation data is regarded as error of commission |
TotalSamplesize |
Numeric. The total number of sample points in the validation data |
snumberOfsamplefromChange |
Numeric. Number of samples from change stratum |
columWithChangeDateFromValidationData |
Numeric. The column number in "x (the input data frame)" that contains the date of change as per validation data. The dates must be decimal year (2015.645). |
columWithChangeDateFromAlgorithm |
Numeric. The column number in "x (the input data frame)" that contains the date of change as per change detection algorithm outpu. The date stamps must be decimal year (2015.645) |
To be completed.
Returns a overall, producer's and user's accuracy
Eliakim Hamunyela
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
#create a raster stack
ra <- raster(ncols=360, nrows=180)
ra[] <- rnorm(ncell(ra))
for (i in 1: 86){
ro <- raster(ncols=360, nrows=180)
ro[] <- rnorm(ncell(ro))
ra <- stack(ra, ro)
}
#generate fake date stamps for layers
imagedate <- decimal_date(seq(as.Date("2010-1-1"), as.Date("2016-12-30"), by = "month"))
#single pixel processing example:
rad <- rasterEngine(inraster=rasterBrick, fun=spatioTemporalMetricsExtractortryCatch,window_dims=c(windowwidth=15,windowwidth =15),
args=list(mYear = 2014,density = F,my_dates =imagedate,threshold = 0.01,spatiaNormPercentile =95, windowwidth =15,tryCatchError=T))
#paralell processing example:
## register the cores
sfQuickInit(cpus=5)
rad <- rasterEngine(inraster=ra, fun=spatioTemporalMetricsExtractortryCatch,window_dims=c(windowwidth=15,windowwidth =15),
args=list(mYear = 2014,density = F,my_dates =imagedate,threshold = 0.01,spatiaNormPercentile =95, windowwidth =15,tryCatchError=T))
writeRaster(rad, filename="test.tif",datatype ="FLT4S", overwrite=TRUE)
# Unregister the cores
sfQuickStop()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.