extremeValues: Minimum and Maximum Values

extremeValuesR Documentation

Minimum and Maximum Values

Description

Returns the minimum or maximum value of an ee.Image. The return value will be an approximation if the polygon (area of the ee.Image) contains too many pixels at the native scale.

Usage

`ee$Image$Extra_maxValue(x, ...)`

`ee$Image$Extra_minValue(x, ...)`

Arguments

x

ee$Image to analyze.

...

Additional arguments for specifying the mode and sampling. See details for more information.

Details

The ... argument can include the following:

  • modeCharacter. Indicates the geometry over which to reduce data. Options: "Rectangle" (default) or "Points".

  • sample_sizeNumeric. Number of points to be created. Relevant only if mode is "Points".

The "Rectangle" mode uses the Image system:footprint, while the "Points" mode samples points over the Image system:footprint.

Value

A number representing the minimum or maximum value.

Examples

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

ee_Initialize()
extra_Initialize()

image <- ee$ImageCollection$Dataset$LANDSAT_LC08_C01_T1$first()[["B1"]]
# max values
ee$Image$Extra_maxValue(image)
ee$Image$Extra_maxValue(image, mode = "Points", sample_size = 2)

# min values
ee$Image$Extra_minValue(image)
ee$Image$Extra_minValue(image, mode = "Points")

## End(Not run)

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