Skip to contents

Get WhiteboxRaster data type

Usage

wbw_data_type(x)

wbw_is_int(x)

wbw_is_float(x)

wbw_is_rgb(x)

Arguments

x

Raster object of class WhiteboxRaster. See wbw_read_raster() for more details.

Value

character String representing the raster data type

Examples

f <- system.file("extdata/dem.tif", package = "wbw")
wbw_read_raster(f) |>
  wbw_data_type()
#> [1] "RasterDataType.F32"
f <- system.file("extdata/dem.tif", package = "wbw")
wbw_read_raster(f) |>
  wbw_is_int()
#> [1] FALSE
f <- system.file("extdata/dem.tif", package = "wbw")
wbw_read_raster(f) |>
  wbw_is_float()
#> [1] TRUE
f <- system.file("extdata/dem.tif", package = "wbw")
wbw_read_raster(f) |>
  wbw_is_rgb()
#> [1] FALSE