ee-getscaleparams: Retrieve scale parameter from EE Image and EE ImageCollection...

ee-getscaleparamsR Documentation

Retrieve scale parameter from EE Image and EE ImageCollection objects.

Description

Earth Engine apply a simply lossless compression technique: IMG_Float_Values = scale * IMG_Integer_Values + offset. ee$Image$getScaleParams and ee$ImageCollection$getScaleParams retrieve the scale parameter for each band of an ee$Image.

Usage

`ee$Image$Extra_getScaleParams(x)`

`ee$ImageCollection$Extra_getScaleParams(x)`

Arguments

x

An ee$Image.or an ee$ImageCollection object.

Value

A list with the scale parameters for each band.

Examples

## Not run: 
library(rgee)
library(rgeeExtra)

ee_Initialize()
extra_Initialize()

# Retrieve scale parameters from the first image in NASA IMERG V06 collection
scale_params <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06")[[1]] %>%
  ee$Image$Extra_getScaleParams()

# Display scale parameters for each band in the image.
scale_params

# Retrieve scale parameters for the NASA IMERG V06 collection.
scale_params_ <- ee$ImageCollection("NASA/GPM_L3/IMERG_V06") %>%
  ee$Image$Extra_getScaleParams()

# Display scale parameters for each band in the image.
scale_params_

## End(Not run)

r-earthengine/rgeeExtra documentation built on Dec. 7, 2023, 9:03 p.m.