EarthEngineREST.jl API

EarthEngineREST Types

EarthEngineREST.EESessionType

EESession type used for authenticating request to the API

  • project::AbstractString

    GCP project name used for REST API requests

  • auth::PyCall.PyObject

    authenticated Python requests session for making requests

source
EarthEngineREST.GridDimensionsType

Type used for defining the number of rows and columns for image requests See https://developers.google.com/earth-engine/reference/rest/v1beta/PixelGrid#GridDimensions

  • width::Integer

    width of the grid, in pixels

  • height::Integer

    height of the grid, in pixels

source
EarthEngineREST.AffineTransformType

Type for defining the affine transform of image requests. The six values form a 2x3 matrix:

See https://developers.google.com/earth-engine/reference/rest/v1beta/PixelGrid#affinetransform

source
EarthEngineREST.PixelGridType

Type used for defining a pixel grid on the surface of the Earth, via a map projection See https://developers.google.com/earth-engine/reference/rest/v1beta/PixelGrid

  • dimensions::GridDimensions

    dimensions of the pixel grid

  • affineTransform::AffineTransform

    affine transform of pixel grid

  • crsCode::AbstractString

    standard coordinate reference system code (e.g. 'EPSG:4326')

source

Image Computations

EarthEngineREST.computepixelsFunction
computepixels(session::EESession, pixelgrid::PixelGrid, image::EE.AbstractEEObject; format::AbstractString = "NPY")

Function to take an EarthEngine computed image and return an Array with geographic information (i.e. GeoArray). This signature will return all of the bands within the image. Currently on the "NPY" format is available. See https://developers.google.com/earth-engine/reference/rest/v1beta/projects.image/computePixels

source
computepixels(session::EESession, pixelgrid::PixelGrid, image::EE.AbstractEEObject, bands::AbstractVector{String}; format::AbstractString = "NPY")

Function to take an EarthEngine computed image and return an Array with geographic information (i.e. GeoArray). Currently on the "NPY" format is available. See https://developers.google.com/earth-engine/reference/rest/v1beta/projects.image/computePixels

source
EarthEngineREST.parse_npy_headerFunction
parse_npy_header(hdr::AbstractString)

Function to parse npy header information to extract dimensions and array dtypes. Customized implementation of NPY.parseheader to handle numpy structured arrays which EE always returns. See https://numpy.org/devdocs/reference/generated/numpy.lib.format.html#format-version-1-0 for spec.

source

Table Computations

EarthEngineREST.computetableFunction
computetable(session::EESession, featurecollection::EE.AbstractEEObject)

Fuction to request data from EarthEngine FeatureCollection and return as a GeoDataFrame. See https://developers.google.com/earth-engine/reference/rest/v1beta/projects.table/computeFeatures

source

Value Computations

EarthEngineREST.computevalueFunction
computevalue(session::EESession, value::EE.AbstractEEObject)

Fuction to request data from any arbitrary EarthEngine computation and return as the appropriate Julia object. See https://developers.google.com/earth-engine/reference/rest/v1beta/projects.value/compute

source

EarthEngineREST internals

EarthEngine.InitializeFunction
Initialize(session::EESession)

Extends the Initialize() function to take an authenticated Earth Engine session and use those credentials.

source
EarthEngineREST._sendrequestFunction
_sendrequest(session::EESession, endpoint::AbstractString, data::Dict{Symbol,<:Any}; version::AbstractString = "latest", nretries::Integer = 4)

Private function for sending requests to EarthEngine REST API. Uses exponential backoff to retry requests if failed with non-fatal error.

source
EarthEngineREST.extract_geotransformFunction
extract_geotransform(x::AffineTransform)

Function to extract geotransform vector from AffineTransformation type

source
extract_geotransform(x::PixelGrid)

Function to extract geotransform vector from PixelGrid type

source
EarthEngineREST.extract_bboxFunction
extract_bbox(x::AffineTransform, griddims::GridDimensions)

Function to extract bounding box vector from AffineTransform type. Vector will be [W, S, E, N]

source
extract_bbox(x::PixelGrid)

Function to extract bounding box vector from PixelGrid type. Vector will be [W, S, E, N]

source
EarthEngineREST.extract_affinemapFunction
extract_affinemap(x::AffineTransform)

Function to extract AffineMap type from AffineTransform type.

source
extract_affinemap(x::PixelGrid)

Function to extract AffineMap type from PixelGrid type.

source