pcmPerformance.Rd
Computes the error for runout distances simuluated using the random walk and PCM model components of the GPP tool in SAGA-GIS.
pcmPerformance( dem, slide_plys, slide_src, slide_id = 1, rw_slp = 33, rw_ex = 3, rw_per = 2, pcm_mu = 0.3, pcm_md = 75, buffer_ext = 500, buffer_source = 50, gpp_iter = 1000, predict_threshold = 0.5, plot_eval = FALSE, return_features = FALSE, saga_lib )
dem | A DEM as a RasterLayer object |
---|---|
slide_plys | Runout tracks as a SpatialPolygonsDataFrame |
slide_src | Source points as a SpatialPointsDataFrame or source areas as a SpatialPolygonsDataFrame |
slide_id | Selects a single runout polygon from slide_plys by row |
rw_slp | Random walk slope threshold - below lateral spreading is modelled |
rw_ex | Random walk exponent controlling lateral spread |
rw_per | Random walk persistence factor to weight flow direction consistency |
pcm_mu | PCM model sliding friction coefficient |
pcm_md | PCM model mass-to-drag ratio (m) |
buffer_ext | (Optional) Defines buffer distance (in meters) around runout polygon to crop source DEM. This helps to reduce computational time |
buffer_source | (Optional) Can define a buffer distance (in meters) to extend source point to a source area |
gpp_iter | Number of model iterations |
predict_threshold | A cutoff value to define what quantile of simulated runout frequencies is the predicted runout. |
plot_eval | logical. If TRUE will plot simulated runout and runout polygon |
return_features | logical. If TRUE, returned list will include GPP input and output data, in addition to a list of error measures. |
saga_lib | The initiated SAGA-GIS geoprocessor object |
A list of runout distance performance measures.
if (FALSE) { # Initialize a saga object saga <- Rsagacmd::saga_gis() # Load elevation model (DEM) dem <- raster(system.file("extdata/elev_12_5m.tif", package="runout.opt")) # Load runout polygons and source points runout_plys <- rgdal::readOGR(system.file("extdata/dflow_runout_ply.shp", package="runout.opt")) source_pnts <- rgdal::readOGR(system.file("extdata/dflow_source_pnt.shp", package="runout.opt")) # Run GPP PCM model for a rounout polygon pcm <- pcmPerformance(dem, slide_plys = runout_plys[1,], slide_src = source_pnts, rw_slp = 40, rw_ex = 3, rw_per = 1.5, pcm_mu = 0.15, pcm_md = 120, gpp_iter = 1000, buffer_ext = 500, buffer_source = 50, plot_eval = TRUE, return_features = TRUE) # Runout distance relative error pcm$length.relerr # Plot GPP PCM runout modelling ouputs gpp_output <- stack(pcm$gpp.parea, pcm$gpp.stop, pcm$gpp.maxvel) names(gpp_output) <- c("Process_area", "Stop_positions", "Max_velocity") plot(gpp_output) }