OpenEO Platform logo

Introduction to openEO using ILWISPy as backend

Notebook prepared by Ben Maathuis and Bas Retsios. ITC-University of Twente, Enschede. The Netherlands. Note that authentication details for GEE access was obtained from internet resources (source: https://github.com/Open-EO/openeo-earthengine-driver)

To get started with openEO Platform review a number of online resources first.

Review the article "The openEO API–Harmonising the Use of Earth Observation Cloud Services Using Virtual Data Cube Functionalities" https://www.researchgate.net/publication/350109855_The_openEO_API-Harmonising_the_Use_of_Earth_Observation_Cloud_Services_Using_Virtual_Data_Cube_Functionalities

Review:

A list of all known openEO providers and their services: https://hub.openeo.org/

Review:

Check the collections and editor functionality at: https://editor.openeo.cloud/

Review:

Get some more information on the data cube concepts: https://openeo.org/documentation/1.0/datacubes.html

Check the required site packages, if not installed already, ensure that they are available before you continue. Install required site packages with command 'pip install package'

This notebook will create within this notebook folder a sub-directory 'Intro_openEO_ILWISPy' used to store the downloaded data and will be assigned as your ILWISPy working-directory.

Connect to openEO Platform and print list of available collections

Import ILWISPy and set working folder

Check OpenEO version and connect to the Earth Engine OpenEO Demo Version

Get started with the openEO Python Client.

Before you continue review the information provided at: https://docs.openeo.cloud/getting-started/python/#connect-to-openeo-platform-and-explore

Processes in openEO are operations that can be applied on (EO) data (e.g. calculate the mean of an array, or mask out observations outside a given polygon). The output of one process can be used as the input of another process, and by doing so, multiple processes can be connected that way in a larger "process graph" that implements a certain algorithm.

Obtain information about available collections - data sources

Note the index number, it starts from 0

Get detailed information about a collection

Load the selected collection, here the spatial extent used is over the Cape Verde islands

Extract rainfall over Zambia for a single day

Multi temporal import - extract CHIRPS rainfall for a full month

Currently GEE in OpenEO does not facilitate multiband tif file creation and download. Now a loop is used to import single time steps to lateron create a multitemporal dataset

Data check using the same time stamp as for the single image download

Check imported data, it's size and value for a given pixel

Uncomment the line below if you want to store the map stack in ILWIS format, you can use the ILWIS386 animation option to review the monthly rainfall product

From a daily time step the total precipitation for the month retrieved is calculated using the 'aggregate - sum' function

Review raster size and some statistics

Uncomment the line below to write your result to disk

Transform your result to a Numpy array so it can be visualized using Matplotlib

Continue with another selected collection or create your own code further below.

Now connect to dataspace.copernicus.eu

This requires registration at: https://dataspace.copernicus.eu/, select the option "Login" and if you don't have an account, create a new account and sign in.

Retrieve Sentinel 2 data

Select for a given temporal range and area of interest, using a cloud cover threshold the 10 meter spatial resolution channels, b2, b3, b4 and b8 (visible blue, green and red as well as the near infrared spectral channels)

Temporal aggregation

From the selected images, perform a temporal aggregation, using the 'median' value for each pixel in your time series

Download the selected dataset

Further raster image processing

Load the downloaded image in ILWISPy, select the 4 spectral channels as Blue, Green, Red and IR, calculate statistics and conduct a linear stretch operation

Transform to a Numpy array

Transform your stretched layers to a Numpy array, in order to visualize your image as a colour composite, using imshow

Export results as a new ILWIS image

Create a new / empty image and as second step load the data and write the output to disk. Review your results using ILWIS386

Four Seasons

Derive the NDVI for the four seasons (summer, autumn, winter and spring) and calulate the Standard Deviation over the different seasons to get an idea of the variability

What can be concluded if looking at the areas with the higher variances and standard deviations