Skip to content

Commit

Permalink
i.eodag: add query, print, and footprints options (#1136)
Browse files Browse the repository at this point in the history
* Add footprints option to save the search results footprints after downloading them

* Add -m tag to list queryables of given provider and/or dataset in JSON format

* Rename dataset option to producttype

* Add list providers and list products in JSON

* Add query options, to allow for extra searching parameters

* Add query option example to manual

* Rename list option to print

* Add print_eodag_configuration

* Check existence of custom config file

* Add DOCSTRING to print_eodag_configurations

* Allow footprint to be saved without downloading

* Add read eodag geojson file

* Fix bug in get_bb function

* Refactor naming of guisections

* Remove the dependencies of extract, delete_archive and output options from the provider

* Add limit option

* Store printing functions in dictionary

* Allow specifying product type when printing eodag products metadata

* Add examples for print option and remove extract and delete archive
options

* Remove JSON save option

* Use geojson to generate footprints directly

---------

Co-authored-by: Stefan Blumentrath <stefan.blumentrath@gmx.de>
Co-authored-by: Veronica Andreo <veroandreo@gmail.com>
  • Loading branch information
3 people committed Jul 10, 2024
1 parent 832add0 commit 4a38040
Show file tree
Hide file tree
Showing 2 changed files with 379 additions and 101 deletions.
73 changes: 62 additions & 11 deletions src/imagery/i.eodag/i.eodag.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h2>DESCRIPTION</h2>
<h3>WARNING: I.EODAG IS UNDER DEVELOPMENT. THIS IS AN EXPERIMENTAL VERSION.</h3>

<em>i.eodag</em> allows to search and download imagery datasets, e.g. Sentinel,
<em>i.eodag</em> allows to search and download imagery scenes, e.g. Sentinel,
Landsat, and MODIS, from a number of different providers.
The module utilizes the
<a href="https://eodag.readthedocs.io/en/stable/">EODAG API</a>,
as a single interface to search for datasets on the providers that EODAG supports.
as a single interface to search for scenes on the providers that EODAG supports.


<p>
Expand Down Expand Up @@ -62,28 +62,35 @@ <h2>EXAMPLES</h2>
<div class="code"><pre>
v.extract input=urbanarea where="NAME = 'Durham'" output=durham

i.eodag -l start=2022-05-25 end=2022-06-01 \
map=durham dataset=S2_MSI_L2A provider=cop_dataspace \
sort=cloudcover,ingestiondate order=asc,desc
i.eodag -l start=2022-05-01 end=2022-06-01 \
map=durham producttype=S2_MSI_L2A provider=cop_dataspace

6 scenes(s) found.
S2B_MSIL2A_20220518T155819_N0400_R097_T17SPV_20220518T204903 2022-05-18T15:58:19 24% S2MSI2A
S2A_MSIL2A_20220513T155821_N0400_R097_T17SPV_20220514T002317 2022-05-13T15:58:21 99% S2MSI2A
S2B_MSIL2A_20220508T155819_N0400_R097_T17SPV_20220508T205707 2022-05-08T15:58:19 100% S2MSI2A
S2A_MSIL2A_20220523T155831_N0400_R097_T17SPV_20220524T002713 2022-05-23T15:58:31 95% S2MSI2A
S2A_MSIL2A_20220503T155831_N0400_R097_T17SPV_20220503T233818 2022-05-03T15:58:31 86% S2MSI2A
S2B_MSIL2A_20220528T155819_N0400_R097_T17SPV_20220528T205325 2022-05-28T15:58:19 2% S2MSI2A
<pre></div>

Search and list the available Sentinel 2 scenes in the Copernicus Data Space
Ecosystem, with at least 70% of the AOI covered:
<div class="code"><pre>
v.extract input=urbanarea where="NAME = 'Durham'" output=durham

i.eodag -l start=2022-05-25 end=2022-06-01 \
dataset=S2_MSI_L2A provider=cop_dataspace \
i.eodag -l start=2022-05-01 end=2022-06-01 \
producttype=S2_MSI_L2A provider=cop_dataspace \
clouds=50 map=durham minimum_overlap=70
<pre></div>

Sort results, descendingly, by <b>cloudcover</b>, and then by <b>ingestiondate</b>
Sort results, descendingly, by <b>cloudcover</b>, and then by <b>ingestiondate</b>
Note that sorting with <b>cloudcover</b> use
unrounded values, while they are rounded to the nearest integer when listing.

<div class="code"><pre>
i.eodag -l start=2022-05-25 end=2022-06-01 \
dataset=S2_MSI_L2A provider=cop_dataspace \
producttype=S2_MSI_L2A provider=cop_dataspace \
sort=cloudcover,ingestiondate order=desc
<pre></div>

Expand All @@ -96,12 +103,21 @@ <h2>EXAMPLES</h2>
area_relation=Contains clouds=3
<pre></div>

Download all available scenes with cloud coverage not exceeding 50%
Search and list the available Sentinel 2 scenes in the Copernicus Data Space
Ecosystem, with relative orbit number 54:

<div class="code"><pre>
i.eodag -l producttype=S2_MSI_L2A \
provider=cop_dataspace save=search_result.geojson \
query="relativeOrbitNumber=54"
<pre></div>

Download all available scenes with cloud coverage not exceeding 50%
in the tmp directory:

<div class="code"><pre>
i.eodag start=2022-05-25 end=2022-06-01 \
dataset=S2_MSI_L2A provider=cop_dataspace clouds=50
producttype=S2_MSI_L2A provider=cop_dataspace clouds=50
<pre></div>

Download only selected scenes from a text file of IDs, using the Copernicus Data
Expand All @@ -122,6 +138,41 @@ <h2>EXAMPLES</h2>
output=download_here
<pre></div>

List recognized eodag providers:
<div class="code"><pre>
i.eodag print=providers
<pre></div>

List recognized eodag providers, offering Sentinel 2 scenes:
<div class="code"><pre>
i.eodag print=providers producttype=S2_MSI_L2A
<pre></div>

List recognized eodag products:
<div class="code"><pre>
i.eodag print=products
<pre></div>

List recognized eodag products, offered by Copernicus Data Space Ecosystem:
<div class="code"><pre>
i.eodag print=products provider=cop_dataspace
<pre></div>

List queryables for Sentinel 2 scenes, that is offered by Copernicus Data Space Ecosystem:
<div class="code"><pre>
i.eodag print=queryables provider=cop_dataspace producttype=S2_MSI_L2A
<pre></div>

List current EODAG configuration:
<div class="code"><pre>
i.eodag print=config
<pre></div>

List current EODAG configuration for Copernicus Data Space Ecosystem:
<div class="code"><pre>
i.eodag print=config provider=cop_dataspace
<pre></div>

<h2>REQUIREMENTS</h2>

<ul>
Expand Down
Loading

0 comments on commit 4a38040

Please sign in to comment.