Metadata-Version: 2.4
Name: actinia-core
Version: 7.0.2
Summary: Actinia Core is an open source REST API for scalable, distributed, high performance processing of geographical data that uses mainly GRASS GIS for computational tasks
Author: Carmen Tawalika, Anika Weinmann, Markus Neteler, Guido Riembauer, Markus Metz, Julia Haas, Marc Jansen, Lina Krisztian, Jorge A. Herrera Maldonado, Sören Gebbert, Momen Mawad, and more
Project-URL: Homepage, https://github.com/actinia-org/actinia_core
Project-URL: Tutorial, https://actinia-org.github.io/actinia_core
Project-URL: API_Docs, https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json
Keywords: processing,earth observation,cloud-based processing,rest api,gis,grass gis,osgeo
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
License-File: AUTHORS.rst
Requires-Dist: actinia-api==3.8.0
Requires-Dist: actinia-rest-lib>=1.0.0
Requires-Dist: actinia-processing-lib>=1.1.1
Requires-Dist: Flask>=3.0.0
Requires-Dist: boto3>=1.6.6
Requires-Dist: colorlog>=4.2.1
Requires-Dist: Flask-HTTPAuth>=3.2.3
Requires-Dist: Flask-RESTful>=0.3.9
Requires-Dist: flask-restful-swagger-2
Requires-Dist: Flask-Cors>=3.0.3
Requires-Dist: fluent-logger>=0.9.4
Requires-Dist: google-cloud>=0.32.0
Requires-Dist: google-cloud-bigquery<=3.40.0
Requires-Dist: google-cloud-storage>=1.6.0
Requires-Dist: gunicorn>=22.0.0
Requires-Dist: matplotlib==3.10.8
Requires-Dist: passlib>=1.7.1
Requires-Dist: psutil>=5.7.0
Requires-Dist: python-json-logger
Requires-Dist: python-keycloak>=2.6.0
Requires-Dist: python-magic>=0.4.15
Requires-Dist: requests>=2.20.0
Requires-Dist: rq==1.16.2
Requires-Dist: setuptools==80.9.0
Requires-Dist: geopandas
Requires-Dist: rasterio==1.5.0
Requires-Dist: pystac==1.14.3
Requires-Dist: PyJWT
Requires-Dist: werkzeug==3.1.5
Requires-Dist: pandas
Requires-Dist: tqdm
Requires-Dist: valkey
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: plugins
Requires-Dist: actinia-metadata-plugin; extra == "plugins"
Requires-Dist: actinia-module-plugin; extra == "plugins"
Requires-Dist: actinia-parallel-plugin; extra == "plugins"
Requires-Dist: actinia-satellite-plugin; extra == "plugins"
Requires-Dist: actinia-stac-plugin; extra == "plugins"
Requires-Dist: actinia-statistic-plugin; extra == "plugins"
Requires-Dist: actinia-tiling-plugin; extra == "plugins"
Dynamic: license-file

# Actinia — The GRASS GIS REST API

Software [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5879231.svg)](https://doi.org/10.5281/zenodo.5879231)
Article [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2631917.svg)](https://doi.org/10.5281/zenodo.2631917)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Docker pulls](https://img.shields.io/docker/pulls/mundialis/actinia-core.svg)](https://hub.docker.com/r/mundialis/actinia-core)

## Project Overview

[Actinia](https://actinia.mundialis.de/) is an open-source REST API for scalable, distributed, high-performance processing of geographical data that mainly uses [GRASS GIS](https://grass.osgeo.org/) for computational tasks.

**Key Features:**

- REST API for processing satellite images, raster and vector data, including time-series.
- Access and manipulate GRASS GIS database via HTTP GET, PUT, POST, and DELETE requests.
- Process cloud-based data, including Landsat 4-9 and Sentinel-2 scenes.
- Output raster data results as GeoTIFF files as resources or in object storage.
- Output vector data results as GeoPackage files as resources or in object storage.

**Links:**

<!---
a more complete API documentation generated with Spinx was here: https://actinia.mundialis.de/api_docs
but no longer exists
--->

- [Software DOI](https://doi.org/10.5281/zenodo.5879231)
- [Article DOI](https://doi.org/10.5281/zenodo.2631917)
- [API Documentation](https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json&nocors)
- [Discussion forum](https://github.com/orgs/actinia-org/discussions)

## Prerequisites

To use actinia, ensure you have the following installed:

- Alpine Linux: `apk add python3 py3-pip`
- Ubuntu: `apt install -y python3 python3-pip`

Additional system packages required for Alpine:

```bash
apk add python3-dev gcc musl-dev linux-headers build-base gdal gdal-tools gdal-dev proj proj-util proj-dev geos-dev py3-numpy-dev
```

## Installation Steps

### Option 1: Manual Installation

Install actinia from PyPI:

```bash
pip install actinia-core
```

### Option 2: Using Docker

Pull the Docker image:

```bash
docker pull mundialis/actinia-core
```

For custom deployments or local setups, refer to the `docker/` subfolder.

### Verification

To verify a successful installation, check API accessibility via the provided endpoints or the `swagger.json`.

## API Documentation

The full API documentation is available [here](https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json&nocors).

## Examples

### Data management

- List all projects that are available in the actinia persistent database:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/projects"
```

- List all mapsets in the project `latlong_wgs84`:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/projects/latlong_wgs84/mapsets"
```

- List all space-time raster datasets (STRDS) in project `latlong_wgs84` and mapset `Sentinel_timeseries`:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/projects/latlong_wgs84/mapsets/modis_ndvi_global/strds"
```

- List all raster map layers of the STRDS:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/projects/latlong_wgs84/mapsets/modis_ndvi_global/strds/ndvi_16_5600m/raster_layers"
```

### Landsat and Sentinel-2 NDVI computation

- Compute NDVI for a specific Landsat scene:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X POST "https://actinia.mundialis.de/api/v3/landsat_process/<scene_id>/TOAR/NDVI"
```

- Compute NDVI for a specific Sentinel-2A scene:

```bash
curl -u 'demouser:gu3st!pa55w0rd' -X POST "https://actinia.mundialis.de/api/v3/sentinel2_process/ndvi/<scene_id>"
```

The results of the asynchronous computations are available as GeoTIFF file in a cloud storage for download.

### List of available endpoints

To see a simple **list of endpoints** (and more), consult the "paths" section in the [API JSON](https://actinia.mundialis.de/api/v3/swagger.json).

To list the available endpoints on command line, run

```bash
# sudo npm install -g json
curl -u 'demouser:gu3st!pa55w0rd' -X GET https://actinia.mundialis.de/api/v3/swagger.json | json paths | json -ka
```

### Development

#### Pre-Commit Hooks

Install [pre-commit](https://pre-commit.com) for automated code checks and formatting before
submitting any new or modified code. Pre-commit installs all necessary tools in a virtual environment
upon first use:

```bash
pip install pre-commit

# activate pre-commit in the code repository
cd <actinia-core_source_dir>
pre-commit install
```

Pre-commit will then be automatically triggered by the `git commit` command. If
it finds any problem it will abort the commit and try to solve it automatically.
In that case review the changes and run again `git add` and
`git commit`.

It is also possible to run pre-commit manually, e.g:

```bash
pre-commit run flake8 --all-files
pre-commit run black --all-files
# pre-commit run yamllint --all-files
# pre-commit run markdownlint --all-files
```

The pre-commit hook set is defined in
[.pre-commit-config.yaml](.pre-commit-config.yaml).

## External Documents

- actinia is also available on [OSGeoLive](https://live.osgeo.org/en/overview/actinia_overview.html)

## Contributors

Thanks to all contributors ❤
[![actinia-core contributors](https://contrib.rocks/image?repo=actinia-org/actinia-core "actinia-core contributors")](https://github.com/actinia-org/actinia-core/graphs/contributors)
