unpack_rgb | R Documentation |
Mapbox terrain-rgb stores global elevation packed into Byte integers.
unpack_rgb(x, filename = "")
x |
three layer raster object |
filename |
optional, filename to store the output |
This function unpacks the three layers of a raster to give floating point elevation data.
terra rast object with one numeric layer
if (interactive() && !is.null(get_api_key())) {
unpack_rgb(read_tiles(type = "mapbox.terrain-rgb"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.