Description Usage Arguments Details Value Author(s) Examples
wrapper for IKARUS and AOA with buffered TrainPoints.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
FFS |
boolean - if True uses a FFS. Default= FALSE |
Tpoints |
SpatialPoints - PointLayer with the TrainingPositions |
buf_size |
numeric - with for the buffer in meter |
design |
character - from for the buffer. Choose from "ROUND","FLAT","SQUARE" |
Stk |
RasterStack - with predictors for classfication |
Stk_name |
character - name of input Stack for the name to write in images and output name. |
plot_res |
boolean - set 'TRUE' to plot the prediction and AOA. Default = TRUE. |
save_png |
boolean - set 'TRUE' to write the images in.png format for prediction and AOA. Default = FALSE. |
save_res |
boolean - set 'TRUE' to write the prediction and AOA in .grd format. Default = FALSE. |
path_res |
character - the path to save the resulting RasterLayer. Required if "save_res" option is used. |
fsize |
numeric - the desired front size for the main and sub text. default = 24. |
path_png_cl |
character - the path to save the resulting plots for classification as png. Required if "save_png" option is used. |
path_png_aoa |
character - the path to save the resulting plots for AOA png. Required if "save_png" option is used. |
This function is a wrapper for the IKARUS workflow for a LLOCV Random Forest classification and further uses the AOA approach by Meyer 2020. By default the resulting prediction and AOA are plotted. By default further uses all varibales for the model, optional uses a FFS (if FFS=TRUE). Optional saves the RasterLayers. Further can save the results to .png format to a desired path.
Returns the classification, model and the AOA. Optional saves the resuting RasterLayer and saves resuöting prediction and AOA to .png images.
Andreas Schönberg
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 | # load libs
require(raster)
require(caret)
require(CAST)
require(doParallel)
require(rgeos)
# required for visualization
require(viridis)
require(png)
require(latticeExtra)
require(gridExtra)
# load data
lau_Stk <- raster::stack(system.file("extdata","lau_RGB.grd",package = "IKARUS"))
lau_tp <-rgdal::readOGR(system.file("extdata","lau_Tpoints.shp",package = "IKARUS"))
# handle CRS string
crs(lau_tp) <- crs(lau_Stk)
### run Dawn
# with training design 0.3 meter radius in cycles
test1 <- Dawn(FFS = F,Tpoints = lau_tp,buf_size = 0.3,design = "ROUND",Stk = lau_Stk,Stk_name = "RGB")
# access results
plot(test1$prediction) # prediciton
plot(test1$AOA) # AOA
test1$model_LLOCV # model
### Test series with DAWN
test1 <- Dawn(FFS = F,Tpoints = lau_tp,buf_size = 0.3,design = "ROUND",Stk = lau_Stk,Stk_name = "RGB")
test2 <- Dawn(FFS = F,Tpoints = lau_tp,buf_size = 0.6,design = "ROUND",Stk = lau_Stk,Stk_name = "RGB")
test3 <- Dawn(FFS = F,Tpoints = lau_tp,buf_size = 1.0,design = "ROUND",Stk = lau_Stk,Stk_name = "RGB")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.