whiteboxing {ursa} | R Documentation |
Wrapper to WhiteboxTools
Description
Wrapper to tools from "whitebox" package to manipulate with ursaRaster
objects
Usage
whiteboxing(tool_name, ...)
Arguments
tool_name |
Either tool name of Whitebox or function name from whitebox. |
... |
List of parameters. |
Details
Wrapper to function wbt_run_tool
.
ursaRaster
object foo
can be passed via parameter input=foo
instead of GeoTIFF file name.
Value
If argument output
is missed or output=FALSE
, then object of class ursaRaster
. Otherwise, output GeoTIFF file name.
Note
Internally, for piping support, first character argument without *.tif
suffix is interpreted as tool_name
. First unnamed character argument with *.tif
suffix or ursaRaster
object is interpreted as input.
Author(s)
Nikita Platonov platonov@sevin.ru
See Also
Examples
if ((requireNamespace("whitebox"))&&(isTRUE(whitebox::wbt_init()))&&
(requireNamespace("stars"))) {
dem <- whitebox::sample_dem_data()
a1 <- c(DEM=read_gdal(dem))
a2 <- whiteboxing("BreachDepressions",input=a1)
b <- list(value=c(a1,a2),difference=c(diff=a1-a2))
print(b)
display(b,layout=c(2,NA),legend=list(list("first","left"),list("last","left")))
if (getRversion()>="4.1.0") {
a5 <- dem |>
whiteboxing("feature_preserving_smoothing",filter=9) |>
whiteboxing("breach_depressions") |>
print()
}
}
[Package ursa version 3.10.4 Index]