unpack_rgb: Unpack Mapbox terrain-RGB

View source: R/get_tiles.R

unpack_rgbR Documentation

Unpack Mapbox terrain-RGB

Description

Mapbox terrain-rgb stores global elevation packed into Byte integers.

Usage

unpack_rgb(x, filename = "")

Arguments

x

three layer raster object

filename

optional, filename to store the output

Details

This function unpacks the three layers of a raster to give floating point elevation data.

Value

terra rast object with one numeric layer

Examples

if (interactive() && !is.null(get_api_key())) {
unpack_rgb(read_tiles(type = "mapbox.terrain-rgb"))
}

ceramic documentation built on April 22, 2023, 1:12 a.m.