Terrascope provides two virtual environments with necessary tools and data so that you can start coding immediately.
Allows developers or scientists to
A Notebook is a web application that allows you to create and share scripts that contain live code, equations, visualizations, and narrative supporting text. It is basically a script broken down into several major blocks (cells) that can be executed sequentially. Together with the supporting text cells, the script should be rather easy to comprehend.
The Terrascope Notebooks are based on the Open Source Jupyter notebooks application and tailored to the needs of remote sensing users. Each notebook has direct access to the Terrascope datasets. A notebook facilitates a better and faster understanding of your algorithm by other users.
In this training, we will focus on the Notebooks.
Once you login, you will land on the home page:
You can either create new notebooks or browse existing ones.
Let's start with a warm up exercise first and do a step-by-step simple band calculation on Sentinel-2 imagery using openEO API.
We'll use OpenEO because it reduces the complexity of handling large amounts and variety of EO data by implementing a standard, with a focus on large scale processing and time series analysis. You can find more information at openeo.org
As a first step, go to your Terrascope Notebook homepage and select "python36" notebook to create a new notebook.
As we are going to use the python client API for openEO, you must start by importing the necessary library. Click on the "+" icon to add a new cell. It will be added automatically as a "Code" cell.
You can also add "Text" cells. These are useful for adding information but won't be executed by the kernel.
In the next step, we are going to create a new session by connecting to the openEO backend:
Now that we have the session, we can ask openEO to return us a raster data cube of Sentinel-2 images for 6 May 2018.
It is recommended to run the cells as you're adding them to make sure that there are no errors. You can do so by clicking on the "⏵" icon.
We can slice the data cube further by limiting it to a boundry box as shown below:
You can extract the bands by calling "band" operation on the openEO data cube on which you can do arithmetic operations. Below, we are calculating the enhanced vegetation index:
The result can be downloaded after authenticating:
You can visualize the output by using rasterio and matplotlib libraries:
Phenology is an important supporting parameter of vegetation that can be derived from remote sensing data. It allows us to evaluate crop conditions, vegetation/crop type in agriculture, and is an indicator for climate change.
Phenology is defined by:
- Start of season, a date and the corresponding value of the biophysical indicator
- End of season, a date and the corresponding value of the biophysical indicator.
Deriving phenology accurately requires a sufficiently dense vegetation index time series for a
given pixel or area. At the same time, a sufficiently high spatial resolution is needed, to avoid
noise from sampling heterogeneous areas in a pixel or area. For time series analysis, high spatial
accuracy is also an important requirement.
Today, no single sensor can really satisfy all these
requirements, limiting the accuracy of the predicted phenology parameters. In this use case, we will
use openEO's capability to easily merge multiple datasets with different resolutions:
- Proba-V 10-daily composites: low spatial resolution (300m), but high temporal resolution
- Sentinel-2: high spatial resolution (10m), low temporal resolution
- Sentinel-1 Gamma0: high spatial & temporal resolution, but no direct link to phenological parameters
This study will demonstrate the multi sensor data fusion approach by merging three datasets into a single dense vegetation index time series. This is provided as input to a phenology algorithm, which was implemented as a User-Defined Function (UDF), so that it can be easily replaced with other implementations.