| 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 |
add_dn_date
add_dn_date(img, date_begin = NULL, include.year = TRUE, chunksize = 8) cal_di(date_begin, chunksize = 8) dndate_start(year, di, chunksize = 8)add_dn_date(img, date_begin = NULL, include.year = TRUE, chunksize = 8) cal_di(date_begin, chunksize = 8) dndate_start(year, di, chunksize = 8)
## Not run: dndate_start(2020, 46) %>% cal_di(include.year = FALSE) ## End(Not run)## Not run: dndate_start(2020, 46) %>% cal_di(include.year = FALSE) ## End(Not run)
colors to hex
col2hex(cname)col2hex(cname)
cname |
color names |
col2hex("grey60")col2hex("grey60")
ee_aggregate
ee_aggregate(col, prop, reducerList = "mean", bandList = 0) ee_aggregate_list(col, prop, reducerList = "mean", bandList = 0)ee_aggregate(col, prop, reducerList = "mean", bandList = 0) ee_aggregate_list(col, prop, reducerList = "mean", bandList = 0)
Get imgcol or img "system:time_start" or "system:time_end"
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)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)
prop |
"system:time_start" or "system:time_end" |
ee_yday: ee.Number
ee_extract_clean
ee_extract_clean(x)ee_extract_clean(x)
Song HeYang, Kong Dongdong
ee_extract2
ee_extract2( imgcol, y, fun = ee$Reducer$mean(), scale = NULL, prefix = "", outfile = NULL, lazy = FALSE, ... )ee_extract2( imgcol, y, fun = ee$Reducer$mean(), scale = NULL, prefix = "", outfile = NULL, lazy = FALSE, ... )
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 |
... |
ee$Image$reduceRegions additional parameters. See
|
Get projection of ee.Image or ee.ImageCollection
ee_get_proj(imgcol)ee_get_proj(imgcol)
imgcol |
ee.Image or ee.ImageCollection |
proj
scale
crs
transform
After map operation, scale and transform information will disappear.
ee_gif
ee_gif( imgcol, vis = NULL, mask = NULL, reigon = NULL, dimensions = 600, crs = "EPSG:3857", framesPerSecond = 2 )ee_gif( imgcol, vis = NULL, mask = NULL, reigon = NULL, dimensions = 600, crs = "EPSG:3857", framesPerSecond = 2 )
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
ee_Init(drive = FALSE, ...)ee_Init(drive = FALSE, ...)
drive |
ignored |
... |
others to |
## Not run: # ee_Initialize(user = "cuijian426", drive = TRUE) ee_init() ## End(Not run)## Not run: # ee_Initialize(user = "cuijian426", drive = TRUE) ee_init() ## End(Not run)
imgcol tools collectionrgee imgcol tools collection
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)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
export_Img(img, task, options)export_Img(img, task, options)
crs + region + crsTransform | √
crs + region + dimensions | √ (resample)
crs + region + scale | √
ee_point_buffer
st_point_buffer(st, scale = 463.3127, half_win = 1, cellsize = NULL)st_point_buffer(st, scale = 463.3127, half_win = 1, cellsize = NULL)
st |
A data.frame with the columns at least of |
scale |
in the unit of |
half_win |
half window of the buffer (in grids). window size equals to
|
## Not run: st <- st_212[, .(site, lon, lat, IGBP)] st_point_buffer_3by3(st, 500) ## End(Not run)## Not run: st <- st_212[, .(site, lon, lat, IGBP)] st_point_buffer_3by3(st, 500) ## End(Not run)