Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ee_print

Print and return metadata about Spatial Earth Engine Objects


Description

Print and return metadata about Spatial Earth Engine Objects. ee_print can retrieve information about the number of images or features, number of bands or geometries, number of pixels, geotransform, data type, properties, and object size.

Usage

ee_print(eeobject, ...)

## S3 method for class 'ee.geometry.Geometry'
ee_print(eeobject, ..., clean = FALSE, quiet = FALSE)

## S3 method for class 'ee.feature.Feature'
ee_print(eeobject, ..., clean = FALSE, quiet = FALSE)

## S3 method for class 'ee.featurecollection.FeatureCollection'
ee_print(eeobject, ..., f_index = 0, clean = FALSE, quiet = FALSE)

## S3 method for class 'ee.image.Image'
ee_print(
  eeobject,
  ...,
  img_band,
  time_end = TRUE,
  compression_ratio = 20,
  clean = FALSE,
  quiet = FALSE
)

## S3 method for class 'ee.imagecollection.ImageCollection'
ee_print(
  eeobject,
  ...,
  time_end = TRUE,
  img_index = 0,
  img_band,
  compression_ratio = 20,
  clean = FALSE,
  quiet = FALSE
)

Arguments

eeobject

Earth Engine Object. Available for: Geometry, Feature, FeatureCollection, Image or ImageCollection.

...

ignored

clean

Logical. If TRUE, the cache will be cleaned.

quiet

Logical. Suppress info message

f_index

Numeric. Index of the ee$FeatureCollection to fetch. Relevant just for ee$FeatureCollection objects.

img_band

Character. Band name of the ee$Image to fetch. Relevant just for ee$ImageCollection and ee$Image objects.

time_end

Logical. If TRUE, the system:time_end property in ee$Image is also returned. See rgee::ee_get_date_img for details.

compression_ratio

Numeric. Measurement of the relative data size reduction produced by a data compression algorithm (ignored if eeobject is not an ee$Image or ee$ImageCollection). By default is 20.

img_index

Numeric. Index of the ee$ImageCollection to fetch. Relevant just for ee$ImageCollection objects.

Value

A list with the metadata of the Earth Engine object.

See Also

Other helper functions: ee_help(), ee_monitoring()

Examples

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

# Geometry
geom <- ee$Geometry$Rectangle(-10,-10,10,10)
Map$addLayer(geom)
ee_print(geom)

# Feature
feature <- ee$Feature(geom, list(rgee = "ee_print", data = TRUE))
ee_print(feature)

# FeatureCollection
featurecollection <- ee$FeatureCollection(feature)
ee_print(featurecollection)

# Image
srtm <- ee$Image("CGIAR/SRTM90_V4")
ee_print(srtm)

srtm_clip <- ee$Image("CGIAR/SRTM90_V4")$clip(geom)
srtm_metadata <- ee_print(srtm_clip)
srtm_metadata$img_bands_names

# ImageCollection
object <- ee$ImageCollection("LANDSAT/LC08/C01/T1_TOA")$
  filter(ee$Filter()$eq("WRS_PATH", 44))$
  filter(ee$Filter()$eq("WRS_ROW", 34))$
  filterDate("2014-03-01", "2014-08-01")$
  aside(ee_print)

## End(Not run)

rgee

R Bindings for Calling the 'Earth Engine' API

v1.0.9
Apache License (>= 2.0)
Authors
Cesar Aybar [aut, cre] (<https://orcid.org/0000-0003-2745-9535>), Wu Qiusheng [ctb] (<https://orcid.org/0000-0001-5437-4073>), Lesly Bautista [ctb] (<https://orcid.org/0000-0003-3523-8687>), Roy Yali [ctb] (<https://orcid.org/0000-0003-4542-3755>), Antony Barja [ctb] (<https://orcid.org/0000-0001-5921-2858>), Kevin Ushey [ctb], Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>), Tim Appelhans [ctb], JJ Allaire [ctb], Yuan Tang [ctb], Samapriya Roy [ctb], MariaElena Adauto [ctb] (<https://orcid.org/0000-0002-2154-2429>), Gabriel Carrasco [ctb] (<https://orcid.org/0000-0002-6945-0419>), Henrik Bengtsson [ctb], Jeffrey Hollister [rev] (Hollister reviewed the package for JOSS, see https://github.com/openjournals/joss-reviews/issues/2272/), Gennadii Donchyts [rev] (Gena reviewed the package for JOSS, see https://github.com/openjournals/joss-reviews/issues/2272/), Marius Appel [rev] (Appel reviewed the package for JOSS, see https://github.com/openjournals/joss-reviews/issues/2272/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.