Metadata-Version: 2.4
Name: sits
Version: 0.8.0
Summary: Online processing of Satellite Image Time Series
Author-email: Kenji Ose <kenji.ose@ec.europa.eu>
License: GPL-3.0
Project-URL: Homepage, https://github.com/kenoz/SITS_utils.git
Keywords: xarray,datacube,sits,satellite,time series,STAC
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bottleneck>=1.6.0
Requires-Dist: dask>=2026.1.1
Requires-Dist: geogif>=0.3
Requires-Dist: geopandas>=1.1.2
Requires-Dist: imageio>=2.37.2
Requires-Dist: netcdf4>=1.7.3
Requires-Dist: numpy>=1.26.4
Requires-Dist: odc-geo>=0.5.0
Requires-Dist: odc-stac>=0.5.2
Requires-Dist: pandas>=2.3.3
Requires-Dist: pillow>=10.4.0
Requires-Dist: planetary-computer>=1.0.0
Requires-Dist: pyarrow>=23.0.0
Requires-Dist: pystac>=1.14.3
Requires-Dist: pystac-client>=0.9.0
Requires-Dist: rasterio>=1.4.4
Requires-Dist: rioxarray>=0.19.0
Requires-Dist: scikit-image>=0.25.2
Requires-Dist: scipy>=1.15.3
Requires-Dist: shapely>=2.1.2
Requires-Dist: sktime>=0.40.1
Requires-Dist: spyndex>=0.9.0
Requires-Dist: xarray>=2025.6.1
Requires-Dist: matplotlib>=3.9.0
Provides-Extra: docs
Requires-Dist: sphinx==7.4.7; extra == "docs"
Requires-Dist: dask; extra == "docs"
Requires-Dist: pyarrow; extra == "docs"
Requires-Dist: sphinx_rtd_theme==2.0.0; extra == "docs"
Requires-Dist: matplotlib==3.9.1; extra == "docs"
Requires-Dist: sphinx-gallery==0.17.0; extra == "docs"
Requires-Dist: omnicloudmask; extra == "docs"
Dynamic: license-file

# Sits Python Package

``sits`` is a high-level Python package designed to simplify the extraction and processing of Satellite Image Time Series (SITS) referenced in STAC catalogs. For any given point or polygon, it efficiently handles data retrieval and, leveraging ``spyndex``, can calculate a wide array of spectral indices. The processed results can be exported in various formats, including image files, CSV tables, or dynamic animated GIFs, with customizable dimensions suitable for applications such as deep learning.
In addition to its core functionalities, the package includes an experimental analysis module that integrates forecasting methods from the ``sktime`` library. This module enables users to apply time series models to satellite-derived data, opening possibilities for predictive analytics and temporal pattern exploration.

---

**Automatic calculation of over 200 spectral indices offered by Spyndex**

![ts index](./docs/source/tutorials/img/spectralindex_timeseries.png)

**Anomaly detection on time series: the example of clear-cutting in forests**

![clearcut detection](./docs/source/tutorials/img/clearcut_detection.png)

![clearcut detection map](./docs/source/tutorials/img/cc_map2.png)

**Quick and easy timelapse creation**

![animated gif 01](./docs/source/tutorials/img/egypt_blend_colnat.gif) 
![animated gif 02](./docs/source/tutorials/img/egypt_blend_colnir.gif)
![animated gif 03](./docs/source/tutorials/img/egypt_blend_ndvi.gif)

---

**GitHub**: [https://github.com/kenoz/SITS_utils](https://github.com/kenoz/SITS_utils)

**Documentation**: [https://sits.readthedocs.io/](https://sits.readthedocs.io/)

**PyPI**: [https://pypi.org/project/sits/](https://pypi.org/project/sits/)

**Tutorials**: [https://sits.readthedocs.io/en/latest/tutorials.html](https://sits.readthedocs.io/en/latest/tutorials.html)


## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install [sits](https://pypi.org/project/sits/).

```bash
pip install sits 
```

## Usage

Explore the [full documentation](https://sits.readthedocs.io/en/latest/index.html) for a complete description of features. To get started quickly, you can also run through the interactive [tutorials](https://sits.readthedocs.io/en/latest/tutorials.html) via your favorite notebook platform or Google Colab.

## Notebooks

If you want to explore the different ways to use the sits package, we recommend running the following Jupyter notebooks, in [Google Colab](https://colab.research.google.com/) for instance:

- [Example 01](https://github.com/kenoz/SITS_utils/blob/main/docs/source/tutorials/colab_sits_ex01.ipynb): explain the basics for retrieving a satellite image time series according to a polygon feature.
- [Example 02](https://github.com/kenoz/SITS_utils/blob/main/docs/source/tutorials/colab_sits_ex02.ipynb): explain how to export a satellite time series into an animated GIF or video file.
- [Example 03](https://github.com/kenoz/SITS_utils/blob/main/docs/source/tutorials/colab_sits_ex03.ipynb): explain how to compute spectral indices with `sits` and `spyndex` packages.
- [Example 04](https://github.com/kenoz/SITS_utils/blob/main/docs/source/tutorials/colab_sits_ex04.ipynb): explain how to parallelize processing tasks in case of multiple vector features.
- [Example 05](https://github.com/kenoz/SITS_utils/blob/main/docs/source/tutorials/colab_sits_ex05.ipynb): explain how to automatically detect forest clear-cuts by using the ``analysis`` module.

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.

### Testing

To ensure the correct behaviour of the module, you can run:

```bash
# Or any of the supported python versions
uv run --python 3.10 --group dev pytest tests/

```

If you want to test all the supported python versions, you can run `./test_all_versions.sh`.

If you want an isolated environment, you can use the `Dockerfile` provided.

To run the matrix test in the isolated environment you can do:

```bash
# Build the image
docker build -t sits-gdal .

# Then run the tests with persistent caching
docker run --rm \
  -v uv-cache:/root/.cache/uv \
  sits-test


```

Or if you want to test live changes, you can Bind Mount your working directory as:
 
```bash
# Run this AFTER building the image
docker run --rm \
  -v uv-cache:/root/.cache/uv \
  -v $(pwd):/app \
  sits-test


```
Remember that if you make changes to the Dockerfile, you will need to build your image again.


## License

[GNU GPL v.3.0](LICENSE)
