Skip to main content

Earth Observation Data Access Gateway

Project description

https://eodag.readthedocs.io/en/latest/_static/eodag_bycs.png

https://badge.fury.io/py/eodag.svg https://readthedocs.org/projects/pip/badge/?version=latest&style=flat https://img.shields.io/github/issues/CS-SI/eodag.svg https://mybinder.org/badge_logo.svg

https://img.shields.io/pypi/l/eodag.svg https://img.shields.io/pypi/pyversions/eodag.svg

EODAG (Earth Observation Data Access Gateway) is a command line tool and a plugin-oriented Python framework for searching, aggregating results and downloading remote sensed images while offering a unified API for data access regardless of the data provider. The EODAG SDK is structured around three functions:

  • List product types: list of supported products and their description

  • Search products (by product type or uid) : searches products according to the search criteria provided

  • Download products : download product “as is”

EODAG is developed in Python. It is structured according to a modular plugin architecture, easily extensible and able to integrate new data providers. Three types of plugins compose the tool:

  • Catalog search plugins, responsible for searching data (OpenSearch, CSW, …), building paths, retrieving quicklook, combining results

  • Download plugins, allowing to download and retrieve data locally (via FTP, HTTP, ..), always with the same directory organization

  • Authentication plugins, which are used to authenticate the user on the external services used (JSON Token, Basic Auth, OAUTH, …).

Since v2.0 EODAG can be run as STAC client or server.

Read the documentation for more insights.

EODAG as STAC client

Installation

EODAG is on PyPI:

python -m pip install eodag

Usage

Command line interface

Create a configuration file from the template user_conf_template.yml provided with the repository, filling in your credentials as expected by each provider (note that this configuration file is required by now. However, this will change in the future).

Then you can start playing with it:

  • To search for products and crunch the results of the search:

    eodag search \
    --conf my_conf.yml \
    --box 1 43 2 44 \
    --start 2018-01-01 \
    --end 2018-01-31 \
    --cloudCover 20 \
    --productType S2_MSI_L1C
    --cruncher FilterLatestIntersect \
    --storage my_search.geojson

The request above search for product types S2_MSI_L1C and will crunch the result using cruncher FilterLatestIntersect and storing the overall result to my_search.geojson.

You can pass arguments to a cruncher on the command line by doing this (example with using FilterOverlap cruncher which takes minimum_overlap as argument):

eodag search -f my_conf.yml -b 1 43 2 44 -s 2018-01-01 -e 2018-01-31 -p S2_MSI_L1C \
             --cruncher FilterOverlap \
             --cruncher-args FilterOverlap minimum_overlap 10

The request above means : “Give me all the products of type S2_MSI_L1C, use FilterOverlap to keep only those products that are contained in the bbox I gave you, or whom spatial extent overlaps at least 10% (minimum_overlap) of the surface of this bbox”

  • To download the result of a previous call to search:

    eodag download --conf my_conf.yml --search-results my_search.geojson
  • To list all available product types and supported providers:

    eodag list
  • To list available product types on a specified supported provider:

    eodag list -p sobloo
  • To see all the available options and commands:

    eodag --help
  • To print log messages, add -v to eodag master command. e.g. eodag -v list. The more v given (up to 3), the more verbose the tool is. For a full verbose output, do for example: eodag -vvv list

STAC REST API

An eodag installation can be exposed through a STAC compliant REST api from the command line:

# eodag serve-rest --help
Usage: eodag serve-rest [OPTIONS]

  Start eodag HTTP server

Options:
  -f, --config PATH   File path to the user configuration file with its
                      credentials
  -d, --daemon TEXT   run in daemon mode
  -w, --world         run flask using IPv4 0.0.0.0 (all network interfaces),
                      otherwise bind to 127.0.0.1 (localhost). This maybe
                      necessary in systems that only run Flask  [default:
                      False]
  -p, --port INTEGER  The port on which to listen  [default: 5000]
  --debug             Run in debug mode (for development purpose)  [default:
                      False]
  --help              Show this message and exit.

Python API

Example usage for interacting with the api in your Python code:

from eodag import EODataAccessGateway

dag = EODataAccessGateway()
product_type = 'S2_MSI_L1C'
footprint = {'lonmin': 1, 'latmin': 43.5, 'lonmax': 2, 'latmax': 44}
start, end = '2021-01-01', '2021-01-15'
search_results = dag.search(productType=product_type, geom=footprint, start=start, end=end)
product_paths = dag.download_all(search_results)
for path in product_paths:
    print('Downloaded : {}'.format(path))

Contribute

If you intend to contribute to eodag source code:

git clone https://github.com/CS-SI/eodag.git
cd eodag
python -m pip install -r requirements-dev.txt
pre-commit install

To run the default test suite (which excludes end-to-end tests):

tox

To only run end-to-end test:

tox -- tests.test_end_to_end

To run the entire tests (units, integration and end-to-end):

tox -- tests eodag

Releases are made by tagging a commit on the master branch. To make a new release,

  • Ensure you correctly updated README.rst and CHANGES.rst (and occasionally, also NOTICE - in case a new dependency is added).

  • Check that the version string in eodag/__meta__.py (the variable __version__) is correctly updated

  • Push your local master branch to remote.

  • Tag the commit that represents the state of the release with a message. For example, for version 1.0, do this: git tag -a v1.0 -m ‘version 1.0’

  • Push the tags to github: git push –tags.

The documentation is managed by a webhook, and the latest documentation on readthedocs follows the documentation present in master. Therefore, there is nothing to do apart from updating the master branch to publish the latest documentation.

LICENSE

EODAG is licensed under Apache License v2.0. See LICENSE file for details.

AUTHORS

EODAG is developed by CS GROUP - France.

CREDITS

EODAG is built on top of amazingly useful open source projects. See NOTICE file for details about those projects and their licenses. Thank you to all the authors of these projects !

Project details


Release history Release notifications | RSS feed

This version

2.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eodag-2.0.1.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eodag-2.0.1-py3-none-any.whl (373.3 kB view details)

Uploaded Python 3

File details

Details for the file eodag-2.0.1.tar.gz.

File metadata

  • Download URL: eodag-2.0.1.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.5.10

File hashes

Hashes for eodag-2.0.1.tar.gz
Algorithm Hash digest
SHA256 ccecdef22f66369dbbf633b82617c4f962f42b11f27a1dbdef4cab6222216b73
MD5 fa720781f3ebe0c46c665f5642b20129
BLAKE2b-256 ddb6fccb117fccff16543785b3880a38835a1b09106e86e9719db9d7dc2afa00

See more details on using hashes here.

File details

Details for the file eodag-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: eodag-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 373.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.5.10

File hashes

Hashes for eodag-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eccf2a8cf6a74be8b11c8087492a2f6b8c076700ab82f62b1a969db633ccf992
MD5 d0a8c3599a241a2b53552f8ccf40a102
BLAKE2b-256 157a75f3302e8939c629d26b3be4773d02ccde11019e1177673a82da790e03b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page