Skip to content

LOEK-RS/cloud_processes

Repository files navigation

Remote Sensing processing in Cloud Platforms

Hint: This repositoriy contains a submodule (the gee processes, since google has its own git thing). To clone everything you have to use the --recurse-submodules flag. To access these files you need to have the right permission. Please contact me (Marvin) if you want to.

git clone --recurse-submodules [email protected]:LOEK-RS/cloud_processes.git

This repository contains code snippets and workflow suggestions for cloud computing platforms (Google Earth Engine and openEO). The goal is, to provide a user friendly description and modularity of common tasks that are needed to get remote sensing data from the platforms. This usually revolves around the following steps and decisions:

  1. Decide on product you want to have.
  2. Define the Area of Interest and time frame
  3. Filter clouds or other unwanted features in the images
  4. Select and Calculate Bands, Indices etc.
  5. Do you need a composite or the full time series?
  6. Do you need the image(s) or the extraction of values in the AOI?

Google Earth Engine

Usage

To get access to gee_processes in the GEE Code Editor use the following link. This works without the permission hussle mentioned above. https://code.earthengine.google.com/?accept_repo=users/Ludwigm6/gee_processes

Functions

Processes in GEE are most of the time specific for a particular ImageCollection. I suggest, as a naming convention for modular functions we use the name of the ImageCollection as a prefix e.g.

exports.S2_SR_maskclouds = function (image) {
  var scl = image.select('SCL');
  var wantedPixels = scl.gt(3).and(scl.lt(7)).or(scl.eq(1)).or(scl.eq(2));
  return image.updateMask(wantedPixels)
}

The exports. means that we can reuse this function in other scripts by importing the file with require(). See here for more explanation about this: Google Earth Engine Code Editor Documentation

Snippets

Snippets are little code chunks that probably do not work on their own but serve as a guidline on how to do something. If you copy snippets from here you most likely have to change some names or parameters in code. Everything that is a variable name is written in CAPS and most likely has to be adjusted to you names.

openEO

The openEO cookbook.

The openEO Documentation

Terminology

AOI

AOI is usually an extent like

aoi <- list(west = 10.452617, south = 51.361166, east = 10.459773, north = 51.364194)

but can also be an sf object that will be converted to geojson by the R client. Currently, a geojson FeatureCollection is not supported, which means that you should only pass the geometry of the sf object like st_geometry(aoi_sf) so it will be converted to a POLYGON and not a collection.

when dealing with larger areas these sf polygons can become quite large, in which case the process graph will become exceptionally long and will be rejected by the backend. In this case just use

st_convex_hull(aoi_sf)

to create a polygon that contains the complete AOI but is still smaller that the bbox, hopefully.

About

A collection of user defined process graphs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published