Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opendatacube/odc-stac
Load STAC items into xarray Datasets.
https://github.com/opendatacube/odc-stac
Last synced: about 1 month ago
JSON representation
Load STAC items into xarray Datasets.
- Host: GitHub
- URL: https://github.com/opendatacube/odc-stac
- Owner: opendatacube
- License: apache-2.0
- Created: 2021-10-12T00:30:20.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2024-02-01T04:39:47.000Z (5 months ago)
- Last Synced: 2024-02-02T04:33:28.399Z (5 months ago)
- Language: Python
- Homepage:
- Size: 526 KB
- Stars: 105
- Watchers: 11
- Forks: 16
- Open Issues: 14
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Lists
- awesome-earthobservation-code - ODC STAC - A stand-alone Python library that allows the loading of STAC Items into an ODC-compatible Xarray `xarray` `Python` (Open Data Cube / Testing your code)
README
odc.stac
########|Documentation Status| |Test Status| |Test Coverage| |Binder|
Load STAC items into ``xarray`` Datasets. Process locally or distribute data
loading and computation with Dask_.Usage
#####odc.stac.load
~~~~~~~~~~~~~.. code-block:: python
catalog = pystac_client.Client.open(...)
query = catalog.search(...)
xx = odc.stac.load(
query.get_items(),
bands=["red", "green", "blue"],
)
xx.red.plot.imshow(col="time")For more details see `Documentation`_ and `Sample Notebooks`_, or try it out on Binder_.
Installation
############Using pip
~~~~~~~~~.. code-block:: bash
pip install odc-stac
To install with ``botocore`` support (for working with AWS):
.. code-block:: bash
pip install 'odc-stac[botocore]'
Using Conda
~~~~~~~~~~~This package is be available on ``conda-forge`` channel:
.. code-block:: bash
conda install -c conda-forge odc-stac
From unreleased source
~~~~~~~~~~~~~~~~~~~~~~To use development version of ``odc-stac`` install dependencies from ``conda``, then
install ``odc-stac`` with ``pip``.Sample ``environment.yml`` is provided below.
.. code-block:: yaml
channels:
- conda-forge
dependencies:
- odc-geo
- xarray
- numpy
- dask
- pandas
- affine
- rasterio
- toolz
- pystac
- pystac-client
- pip
- pip:
- "git+https://github.com/opendatacube/odc-stac/"Developing
##########To develop ``odc-stac`` locally using pip (assuming you have virtualenvwrapper_ installed):
.. code-block:: bash
git clone https://github.com/opendatacube/odc-stac
cd odc-stac
mkvirtualenv odc-stac
pip install -e .
pip install -r requirements-dev.txtRun tests with pytest_:
.. code-block:: bash
pytest
Linting is provided by mypy_, pylint_, and black_:
.. code-block:: bash
black --check .
pylint -v odc
mypy odc.. |Documentation Status| image:: https://readthedocs.org/projects/odc-stac/badge/?version=latest
:target: https://odc-stac.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status.. |Test Status| image:: https://github.com/opendatacube/odc-stac/actions/workflows/main.yml/badge.svg
:target: https://github.com/opendatacube/odc-stac/actions/workflows/main.yml
:alt: Test Status.. |Test Coverage| image:: https://codecov.io/gh/opendatacube/odc-stac/branch/develop/graph/badge.svg?token=HQ8nTuZHH5
:target: https://codecov.io/gh/opendatacube/odc-stac
:alt: Test Coverage.. |Binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/opendatacube/odc-stac/develop?urlpath=lab/workspaces/demo
:alt: Run Examples in Binder.. _Binder: https://mybinder.org/v2/gh/opendatacube/odc-stac/develop?urlpath=lab/workspaces/demo
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io
.. _pytest: https://docs.pytest.org
.. _mypy: http://mypy-lang.org/
.. _pylint: https://pylint.org/
.. _black: https://github.com/psf/black
.. _`Documentation`: https://odc-stac.readthedocs.io/
.. _`Sample Notebooks`: https://odc-stac.readthedocs.io/en/latest/examples.html
.. _Dask: https://dask.org/