Metadata-Version: 2.4
Name: odc-stac
Version: 0.5.2
Summary: Tooling for converting STAC metadata to ODC data model
Author: Open Data Cube
Maintainer: Open Data Cube
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Typing :: Typed
License-File: LICENSE
Requires-Dist: affine
Requires-Dist: odc-geo>=0.4.7
Requires-Dist: odc-loader>=0.6.4
Requires-Dist: rasterio>=1.0.0,!=1.3.0,!=1.3.1
Requires-Dist: dask[array]
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas
Requires-Dist: pystac>=1.0.0,<2
Requires-Dist: toolz
Requires-Dist: typing-extensions
Requires-Dist: xarray>=0.19
Requires-Dist: botocore ; extra == "botocore"
Requires-Dist: sphinx ; extra == "docs"
Requires-Dist: sphinx_rtd_theme ; extra == "docs"
Requires-Dist: nbsphinx ; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints ; extra == "docs"
Requires-Dist: matplotlib-inline ; extra == "docs"
Requires-Dist: pandas ; extra == "docs"
Requires-Dist: distributed ; extra == "docs"
Requires-Dist: ipython ; extra == "docs"
Requires-Dist: ipykernel ; extra == "docs"
Requires-Dist: pytest ; extra == "test"
Requires-Dist: pytest-cov ; extra == "test"
Requires-Dist: pytest-timeout ; extra == "test"
Requires-Dist: pystac_client ; extra == "test"
Requires-Dist: distributed ; extra == "test"
Requires-Dist: geopandas ; extra == "test"
Requires-Dist: pytest ; extra == "test-all"
Requires-Dist: pytest-cov ; extra == "test-all"
Requires-Dist: pytest-timeout ; extra == "test-all"
Requires-Dist: pystac_client ; extra == "test-all"
Requires-Dist: distributed ; extra == "test-all"
Requires-Dist: geopandas ; extra == "test-all"
Requires-Dist: stackstac ; extra == "test-all"
Project-URL: Bug Reporting, https://github.com/opendatacube/odc-stac/issues
Project-URL: Documentation, https://odc-stac.readthedocs.io/en/latest/
Project-URL: Homepage, https://github.com/opendatacube/odc-stac/
Provides-Extra: botocore
Provides-Extra: docs
Provides-Extra: test
Provides-Extra: test-all

odc.stac
########

|Documentation Status| |Test Status| |Test Coverage| |Binder| |Discord|

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.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 it's best to use provided devcontainer_.

.. code-block:: bash

   git clone https://github.com/opendatacube/odc-stac
   code odc-stac

Once running inside the dev container, run 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

.. |Discord| image:: https://img.shields.io/discord/1212501566326571070?label=Discord&logo=discord&logoColor=white&color=7289DA
   :target: https://discord.gg/4hhBQVas5U
   :alt: Join Discord for support

.. _Binder: https://mybinder.org/v2/gh/opendatacube/odc-stac/develop?urlpath=lab/workspaces/demo

.. _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/

.. _devcontainer: https://code.visualstudio.com/docs/devcontainers/containers

