C2 - Data Exploration Service

The service interfaces allows the researchers to discover and explore a large variety and volume of geospatial datasets including Earth Observation and Planetary Science products driven by community needs. It implements the Digital Earth concept, enabling visualization, combination, processing and download.

Explorer

Explorer is a web-based graphic user interface to allow users to explore, process, access and download data. Explorer integrates also data processing functionalities, a dashboard to setup the application and it has been integrated with the NEANIAS AAI core service.

It’s available at https://explorer.adamplatform.eu/

adamapi

The adamapi Application Processing Interfaces (APIs) provide a python-library which could be directly integrated in users’s code and application to access the ADAM data and processing capabilities. user’s code and applications.

Version

  • adamapi==2.0.1r1

Installation

1. Pre-packaged

They are available as a pre-packaged module in the base image of the Jupyter instance (C3.1). The user can directly import it in a notebook.

import adamapi

2. Standalone python package

The are also available as a package that could be installed in the user environment. The following procedures had been tested on Ubuntu 18.04/20.04.

  • Global installation (Pre-Requirements: python3 installed)
sudo apt-get install python3-gdal gdal-bin python3-pip --yes
python3 -m pip install --upgrade pip
pip3 install adamapi==2.0.1r1
  • In a python3 virtual environment
sudo apt-get install python3-venv python3-gdal gdal-bin --yes
VENVNAME="adamapi"
python3 -m venv "${VENVNAME}"
PYTHONVERSION=$(ls ${VENVNAME}/lib/)
source "${VENVNAME}/bin/activate";
python3 -m pip install --upgrade pip;
pip install adamapi==2.0.1r1
ln -s "/usr/lib/python3/dist-packages/osgeo" "${VENVNAME}/lib/${PYTHONVERSION}/site-packages/osgeo"

APIs definition

The adamapi library is divided in 4 modules:

  1. Auth, to authenticate (using the API KEY)
  2. Datasets, to list available Datasets
  3. Search, to discover available Products for a specific Dataset, including metadata (e.g. geometry, tiles, cloud cover, …)
  4. GetData, to access the selected Product

1. Auth

To use the API the user needs to have an account on the ADAM service and retrieve her/his individual Api Key from the user profile window. The Api Key remains valid with no temporal limitation.

IMAGE

The authentication with a thematic service endpoint is performed as follows:

from adamapi import Auth
A = Auth()
a.setKey(API_Key)
a.setAdamCore(<THEMATIC-ADAM-ENDPOINT>)
a.authorize()

2. Datasets

This module provides the discovery functionality to get:

  • the full list of available datasets
from adamapi import Datasets
datasets = Datasets(a)
items = datasets.getDatasets()
print( "Availlable datasets:")
for key in items: print( key )
  • the metadata of a specific dataset
datasets = Datasets(a)
s5p_dataset = datasets.getDatasets( '57076:S5P_OFFL_L2__AER_AI_PRODUCT_AEROSOL_INDEX_340_380)
print( "Details for dataset with id 57076:S5P_OFFL_L2__AER_AI_PRODUCT_AEROSOL_INDEX_340_380:")
print( 's5p_dataset )
print( 'Dataset description:' )
print( s5p_dataset[ 'description' ] )
print( 'Dataset resolution:' )
print( s5p_dataset[ 'resolution' ] )

4. GetData

This modules provides a method to downoad product (GeoTiff format)​

  • getData() method accepts the following parameters:
position/keyword mandatory type default description
0 True str   The datasetId
1 True str   The productId
outputFname False str {{productId}} output filename pattern. if not set, the product id is the filename

In the following example the getData method is used to retrieve a tif image. The list of available images can be discovered with the search().

from adamapi import GetData
image=data.getData('57076:S5P_OFFL_L2__AER_AI_PRODUCT_AEROSOL_INDEX_340_380', 'S5P_OFFL_L2__AER_AI_20200801T130108_20200801T144237_14516_01_010302_20200806T182656_PRODUCT_aerosol_index_340_380_4326.tif')