Skip to content

CS-SI/eodag-cube

Repository files navigation

EODAG-cube

This project is the data-access part of EODAG

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

Installation

EODAG-cube is on PyPI:

python -m pip install eodag-cube

Usage - Python API

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

from eodag import EODataAccessGateway
from rasterio.crs import CRS

dag = EODataAccessGateway()
search_criteria = dict(
    provider='earth_search',
    productType='S2_MSI_L1C',
    geom=[1, 43.5, 2, 44],
    start='2020-06-04',
    end='2020-06-05',
)
search_results = dag.search(**search_criteria)
product = search_results[0]
product

EOProduct

Whole product as XarrayDict:

product.to_xarray()

XarrayDict

Single asset as xarray.Dataset:

product.assets["blue"].to_xarray()

Dataset

fsspec.core.OpenFile file object:

product.assets["blue"].get_file_obj()

<File-like object S3FileSystem, sentinel-s2-l1c/tiles/31/T/DJ/2020/6/4/0/B02.jp2>

Contribute

If you intend to contribute to eodag-cube source code:

git clone https://github.com/CS-SI/eodag-cube.git
cd eodag-cube
python -m pip install -e .[dev]
pre-commit install
tox

LICENSE

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

AUTHORS

EODAG is developed by CS GROUP - France.