Learn R Programming

ceramic (version 0.9.5)

unpack_rgb: Unpack Mapbox terrain-RGB

Description

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

Usage

unpack_rgb(x, filename = "")

Value

terra rast object with one numeric layer

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.

Examples

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

Run the code above in your browser using DataLab