Author: EUMETSAT Copyright: 2024 EUMETSAT Licence: MIT
How to use EODAG to search and access DEDL data
EODAG is a command line tool and a Python package for searching and downloading earth observation data via a unified API regardless of the data provider. Detailed information about the usage of EODAG can be found on the project documentation page.
This notebook demonstrates how to use the DEDL provider in EODAG, using Python code.
Setup: EODAG configuration to use the provider DEDL .
Search: search DEDL data, we search for Sentinel-3 data.
The output_dir, the directory where to store downloaded products.
The DEDL credentials, you’ll be asked to enter your DEDL credentials.
The search timeout, it is of 60 seconds to avoid any unexpected errors because of long running search queries.
importosfromgetpassimportgetpassworkspace='eodag_workspace'ifnotos.path.isdir(workspace):os.mkdir(workspace)#os.environ["EODAG__DEDL__DOWNLOAD__OUTPUT_DIR"] = os.path.abspath(workspace)os.environ["EODAG__DEDL__DOWNLOAD__OUTPUTS_PREFIX"]=os.path.abspath(workspace)os.environ["EODAG__DEDL__PRIORITY"]="10"os.environ["EODAG__DEDL__SEARCH__TIMEOUT"]="60"DESP_USERNAME=input("Please input your DESP username or email: ")DESP_PASSWORD=getpass("Please input your DESP password: ")os.environ["EODAG__DEDL__AUTH__CREDENTIALS__USERNAME"]=DESP_USERNAMEos.environ["EODAG__DEDL__AUTH__CREDENTIALS__PASSWORD"]=DESP_PASSWORD
To search we use the search method.
This method returns a SearchResult object that stores the products obtained from a given page (default: page=1) and a given maximum number of items per page (default: items_per_page=20). The parameter items_per_page can be set to a higher value, or, the search_all() method can be used instead.
In the following cell we define the search criteria.
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.\n\n- All Sentinel-3 NRT products are available at pick-up point in less than 3h\n- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.\nSentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.'
EODAG can filter the products contained in a SearchResult object.
Products can be filtered according to their properties.
The following example shows how to filter products to keep only those whose cloud cover is less than 30%. And then restrict the results to a certain area.
filtered_products=products_first_page.filter_property(cloudCover=20,operator="lt")print(f"Got now {len(filtered_products)} products after filtering by cloud cover.")
Got now 10 products after filtering by cloud cover.
filtered_products=filtered_products.filter_overlap(geometry=(14.8,37.7,15,38.0),contains=True)print(f"Got now {len(filtered_products)} products after filtering by geometry.")
Got now 8 products after filtering by geometry.
Have a look now at the first of the fltered products.
'The SLSTR level 1 products contain: the radiances of the 6 visible (VIS), Near Infra-Red (NIR) and Short Wave Infra-Red (SWIR) bands (on the A and B stripe grids); the Brightness Temperature (BT) for the 3 Thermal Infra-Red (TIR) bands; the BT for the 2 Fire (FIR) bands. Resolution: 1km at nadir (TIR), 500m (VIS). All are provided for both the oblique and nadir view. These measurements are accompanied with grid and time information, quality flags, error estimates and meteorological auxiliary data.
- All Sentinel-3 NRT products are available at pick-up point in less than 3h
- All Sentinel-3 Non Time Critical (NTC) products are available at pick-up point in less than 30 days.
Sentinel-3 is part of a series of Sentinel satellites, under the umbrella of the EU Copernicus programme.',
fig=plt.figure(figsize=(20,16))fori,productinenumerate(filtered_products,start=1):# This line takes care of downloading the quicklookquicklook_path=product.get_quicklook()img=mpimg.imread(quicklook_path)ax=fig.add_subplot(4,2,i)ax.set_title(product.properties['dedl:beginningDateTime']+"\n"+product.properties['modificationDate'])plt.imshow(img)plt.tight_layout()
EOProducts can be downloaded individually. The last image is going to be downloaded.