Package: eodag
CheckoutEODAG Jupyterlab extension:eodag-labextension!
This will bring a friendly UI to your notebook and help you search and browse for EO products usingeodag.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 descriptionSearch products (by product type or uid) : searches products according to the search criteria providedDownload 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 resultsDownload plugins, allowing to download and retrieve data locally (via FTP, HTTP, ..), always with the same directory
organizationAuthentication 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 asSTAC client or server.Readthe documentationfor more insights.InstallationEODAG is available onPyPI:python-mpipinstalleodagAnd withcondafrom theconda-forge channel:condainstall-cconda-forgeeodagUsageFor downloading you will need to fill your credentials for the desired providers in youreodag user configuration file.
The file will automatically be created with empty values on the first run.Python APIExample usage for interacting with the api in your Python code:fromeodagimportEODataAccessGatewaydag=EODataAccessGateway()search_results,total_count=dag.search(productType='S2_MSI_L1C',geom={'lonmin':1,'latmin':43.5,'lonmax':2,'latmax':44},# accepts WKT polygons, shapely.geometry, ...start='2021-01-01',end='2021-01-15')product_paths=dag.download_all(search_results)This will search for Sentinel 2 level-1C products on the default provider and return the found products first page and
an estimated total number of products matching the search criteria. And then it will download these products. Please
check thePython API User Guidefor more details.STAC REST APIAn eodag instance can be exposed through a STAC compliant REST api from the command line:$eodagserve-rest--helpUsage:eodagserve-rest[OPTIONS]StarteodagHTTPserverSetEODAG_CORS_ALLOWED_ORIGINSenvironmentvariabletoconfigureCross-OriginResourceSharingallowedoriginsascomma-separatedURLs(e.g.'http://somewhere,htttp://somewhere.else').Options:-f,--configPATHFilepathtotheuserconfigurationfilewithitscredentials,defaultis~/.config/eodag/eodag.yml-l,--locsPATHFilepathtothelocationshapefilesconfigurationfile-d,--daemonrunindaemonmode-w,--worldrunuvicornusingIPv40.0.0.0(allnetworkinterfaces),otherwisebindto127.0.0.1(localhost).-p,--portINTEGERTheportonwhichtolisten[default:5000]--debugRunindebugmode(fordevelopmentpurpose)--helpShowthismessageandexit.# run server$eodagserve-rest# list available product types for ``peps`` provider:$curl"http://127.0.0.1:5000/collections?provider=peps"|jq".collections[].id""S1_SAR_GRD""S1_SAR_OCN""S1_SAR_SLC""S2_MSI_L1C""S2_MSI_L2A"# search for items$curl"http://127.0.0.1:5000/search?collections=S2_MSI_L1C&bbox=0,43,1,44&datetime=2018-01-20/2018-01-25"\|jq".numberMatched"6# browse for items$curl"http://127.0.0.1:5000/catalogs/S2_MSI_L1C/country/FRA/year/2021/month/01/day/25/cloud_cover/10/items"\|jq".numberMatched"9# get download link$curl"http://127.0.0.1:5000/catalogs/S2_MSI_L1C/country/FRA/year/2021/month/01/day/25/cloud_cover/10/items"\|jq".features[0].assets.downloadLink.href""http://127.0.0.1:5000/catalogs/S2_MSI_L1C/country/FRA/year/2021/month/01/day/25/cloud_cover/10/items/S2A_MSIL1C_20210125T105331_N0209_R051_T31UCR_20210125T130733/download"# download$wget"http://127.0.0.1:5000/catalogs/S2_MSI_L1C/country/FRA/year/2021/month/01/day/25/cloud_cover/10/items/S2A_MSIL1C_20210125T105331_N0209_R051_T31UCR_20210125T130733/download"eodag-serveris available onhttps://hub.docker.com/r/csspace/eodag-server:dockerrun-p5000:5000--rmcsspace/eodag-server:2.12.0You can also browse over your STAC API server usingSTAC Browser.
Simply run:gitclonehttps://github.com/CS-SI/eodag.gitcdeodagdocker-composeup# or for a more verbose logging:EODAG_LOGGING=3docker-composeupAnd browsehttp://127.0.0.1:5001:For more information, seeSTAC REST API usage.Command line interfaceStart playing with the CLI:To search for some products:eodag search --productType S2_MSI_L1C --box 1 43 2 44 --start 2021-03-01 --end 2021-03-31The request above searches forS2_MSI_L1Cproduct types in a given bounding box, in March 2021. It saves the results in a GeoJSON file (search_results.geojsonby default).Results are paginated, you may want to get all pages at once with--all, or search products having 20% of maximum coud cover with--cloudCover20. For more information on available options:eodag search --helpTo download the result of the previous call to search:eodag download --search-results search_results.geojsonTo download only the result quicklooks of the previous call to search:eodag download --quicklooks --search-results search_results.geojsonTo list all available product types and supported providers:eodag listTo list available product types on a specified supported provider:eodag list -p creodiasTo see all the available options and commands:eodag --helpTo print log messages, add-vto eodag master command. e.g.eodag-vlist. The morevgiven (up to 3), the more verbose the tool is. For a full verbose output, do for example:eodag-vvvlistContributeHave you spotted a typo in our documentation? Have you observed a bug while running EODAG?
Do you have a suggestion for a new feature?Don’t hesitate and open an issue or submit a pull request, contributions are most welcome!For guidance on setting up a development environment and how to make a
contribution to eodag, see thecontributing guidelines.LicenseEODAG is licensed under Apache License v2.0.
See LICENSE file for details.AuthorsEODAG has been created byCS GROUP - France.CreditsEODAG 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!