Description Usage Arguments Details Value Examples
View source: R/randomwalk_performance.R
Computes the area under the receiver operating characteristic curve (AUROC) for runout paths simuluated using the random walk model component of the GPP tool in SAGA-GIS. The AUROC compares a runout polygon to the simulated path.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | rwPerformance(
dem,
slide_plys,
slide_src,
slide_id = 2,
slp = 33,
ex = 3,
per = 2,
gpp_iter = 1000,
buffer_ext = 500,
buffer_source = NULL,
plot_eval = 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 to run GPP model |
slp |
Random walk slope threshold - below lasteral spreading is modelled |
ex |
Random walk exponent controlling lateral spread |
per |
Random walk persistence factor to weight flow direction consistency |
gpp_iter |
Number of model iterations |
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 |
plot_eval |
logical. If TRUE will plot random walk path and runout polygon |
saga_lib |
The initiated SAGA-GIS geoprocessor object |
Runout source can be either point or area.
The area under the receiver operating characteristic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# Initialize a saga object
saga <- Rsagacmd::saga_gis()
# Load elevation model (DEM)
dem <- raster::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 random walk model for a rounout polygon
rw <- rwPerformance(dem, slide_plys = runout_plys[1,], slide_src = source_pnts,
slp = 30, ex = 3, per = 2,
gpp_iter = 1000, buffer_ext = 500, buffer_source = 50,
plot_eval = TRUE, saga_lib = saga)
rw # returns AUROC
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.