knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE )
library(rgeeExtra) library(rgee) ee_Initialize() # Initialize the Google Earth Engine API connection extra_Initialize() # Initialize the extended functionalities of rgeeExtra
[Image or ImageCollection]$getOffsetParams: Apply offset parameters for each bands.
[Image or ImageCollection]$getScaleParams: Apply scale parameters for each bands.
ee$ImageCollection("NASA/GPM_L3/IMERG_V06") %>% ee$ImageCollection$first() %>% ee$ImageCollection$getOffsetParams() ee$ImageCollection("NASA/GPM_L3/IMERG_V06") %>% ee$ImageCollection$first() %>% ee$Image$getScaleParams()
Computes one or more spectral indices for an ee$Image
or an ee$ImageCollection
object.
s2_indices <- ee$ImageCollection("COPERNICUS/S2_SR") %>% ee$ImageCollection$first() %>% ee$Image$preprocess()%>% ee$Image$spectralIndex(c("NDVI", "SAVI")) names(s2_indices)
Masks clouds and shadows in an ee$Image
. Valid just for Surface Reflectance products. This function may mask water as well as clouds for the Sentinel-3 Radiance product.
img <- ee$ImageCollection("COPERNICUS/S2_SR") %>% ee$ImageCollection$first() %>% ee$Image$maskClouds(prob = 75,buffer = 300,cdi = -0.5) names(img)
Streamlining interactions with the SpatioTemporal Asset Catalog (STAC), get metadata easier!
# get metadata ee$ImageCollection("NASA/GPM_L3/IMERG_V06") %>% ee$ImageCollection$first() %>% ee$Image$getSTAC() %>% ee$Image$getInfo() # get citation ee$ImageCollection("NASA/GPM_L3/IMERG_V06") %>% ee$ImageCollection$first() %>% ee$Image$getDOI()
Apply panchromatic sharpening to an ee$Image
or an ee$ImageCollection
. Optionally, run quality assessments between the original and sharpened Image to measure spectral distortion and set results as properties of the sharpened Image.
img <- ee$Image("LANDSAT/LC08/C01/T1_TOA/LC08_047027_20160819") img_sharp <- ee$Image$panSharpen(img, method="HPFA", qa=c("MSE", "RMSE"), maxPixels=1e13) Map$centerObject(img) Map$addLayer(img_sharp, list(bands=c("B4", "B3", "B2"))) | Map$addLayer(img, list(bands=c("B4", "B3", "B2")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.