Package 'rgee2'

Title: Extra functions for R Google Earth Engine
Description: Google Earth Engine Extensions in R.
Authors: Dongdondg Kong [aut, cre] (ORCID: <https://orcid.org/0000-0003-1836-8172>)
Maintainer: Dongdondg Kong <[email protected]>
License: MIT + file LICENSE
Version: 0.1.2
Built: 2026-05-27 06:54:28 UTC
Source: https://github.com/rpkgs/rgee2

Help Index


add_dn_date

Description

add_dn_date

Usage

add_dn_date(img, date_begin = NULL, include.year = TRUE, chunksize = 8)

cal_di(date_begin, chunksize = 8)

dndate_start(year, di, chunksize = 8)

Examples

## Not run: 
dndate_start(2020, 46) %>% cal_di(include.year = FALSE)

## End(Not run)

colors to hex

Description

colors to hex

Usage

col2hex(cname)

Arguments

cname

color names

Examples

col2hex("grey60")

ee_aggregate

Description

ee_aggregate

Usage

ee_aggregate(col, prop, reducerList = "mean", bandList = 0)

ee_aggregate_list(col, prop, reducerList = "mean", bandList = 0)

ee_date

Description

Get imgcol or img "system:time_start" or "system:time_end"

Usage

as_date_img(x, prop = "system:time_start")

as_date_millis(x)

str_date(date)

ee_systemtime(x, prop = "system:time_start")

ee_yday(x, ...)

ee_timestart(x)

ee_timeend(x)

Arguments

prop

"system:time_start" or "system:time_end"

Value

  • ee_yday: ee.Number


ee_extract_clean

Description

ee_extract_clean

Usage

ee_extract_clean(x)

Author(s)

Song HeYang, Kong Dongdong


ee_extract2

Description

ee_extract2

Usage

ee_extract2(
  imgcol,
  y,
  fun = ee$Reducer$mean(),
  scale = NULL,
  prefix = "",
  outfile = NULL,
  lazy = FALSE,
  ...
)

Arguments

y

ee$Geometry$*, ee$Feature, ee$FeatureCollection, sfc or sf objects.

fun

ee$Reducer object. Function to summarize the values. The function must take a single numeric value as an argument and return a single value. See details.

scale

A nominal scale given in meters of the Image projection to work in. By default 1000.

lazy

Logical. If TRUE, a future::sequential object is created to evaluate the task in the future. Ignore if via is set as "getInfo". See details.

...

ee$Image$reduceRegions additional parameters. See ee_help(ee$Image$reduceRegions) for more details.


Get projection of ee.Image or ee.ImageCollection

Description

Get projection of ee.Image or ee.ImageCollection

Usage

ee_get_proj(imgcol)

Arguments

imgcol

ee.Image or ee.ImageCollection

Value

  • proj

  • scale

  • crs

  • transform

Note

After map operation, scale and transform information will disappear.


ee_gif

Description

ee_gif

Usage

ee_gif(
  imgcol,
  vis = NULL,
  mask = NULL,
  reigon = NULL,
  dimensions = 600,
  crs = "EPSG:3857",
  framesPerSecond = 2
)

Arguments

mask

(Feature|Geometry|Object) The Geometry or Feature to clip to.

dimensions

A number or pair of numbers in format c(WIDTH,HEIGHT). Max dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling.

crs

A CRS string specifying the projection of the output. "EPSG:4326" and "EPSG:3857" (Web Mercator projection) are the most frequent used.

framesPerSecond

String. Animation speed.

region

(optional) ee$Geometry$Polygon, GeoJSON or c(E,S,W,N). Geospatial region of the result. By default, the whole image.

crs_transform

The affine transform to use for the output pixel grid.

scale

A scale to determine the output pixel grid; ignored if both crs and crs_transform are specified.

format

String. The output format (only 'gif' is currently supported).


ee_init

Description

ee_init

Usage

ee_Init(drive = FALSE, ...)

Arguments

drive

ignored

...

others to rgee::ee_Initialize()

See Also

rgee::ee_Initialize()

Examples

## Not run: 
# ee_Initialize(user = "cuijian426", drive = TRUE)
ee_init()

## End(Not run)

rgee imgcol tools collection

Description

rgee imgcol tools collection

Usage

ee_getInfo(x)

ee_num2str(x)

getInfo(x)

getInfo2(value)

ee_aggregate_array(col, prop = "system:time_start")

ee_systemIndex(col)

ee_first(col)

ee_last(col)

ee_bandNames(x)

ee_propertyNames(col)

ee_properties(col, verbose = TRUE)

ee_filterDate(col, date_start, date_end = NULL)

ee_filterBounds(col, geom)

image_size(x)

export_Img

Description

export_Img

Usage

export_Img(img, task, options)

Some options to clip regional data

    1. crs + region + crsTransform | √

    1. crs + region + dimensions | √ (resample)

    1. crs + region + scale | √


ee_point_buffer

Description

ee_point_buffer

Usage

st_point_buffer(st, scale = 463.3127, half_win = 1, cellsize = NULL)

Arguments

st

A data.frame with the columns at least of site, lon, and lat.

scale

in the unit of m

half_win

half window of the buffer (in grids). window size equals to 2*halfwin + 1.

Examples

## Not run: 
st <- st_212[, .(site, lon, lat, IGBP)]
st_point_buffer_3by3(st, 500)

## End(Not run)