Skip to main content

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

Project description

Actinia — The GRASS GIS REST API

Software DOI Article DOI License: GPL v3 Docker pulls

Actinia is an open source REST API for scalable, distributed, high performance processing of geographical data that mainly uses GRASS GIS for computational tasks.

It provides a REST API to process satellite images, time series of satellite images, arbitrary raster data with geographical relations and vector data.

The REST interface allows to access, manage and manipulate the GRASS GIS database via HTTP GET, PUT, POST and DELETE requests and to process raster, vector and time series data located in a persistent GRASS GIS database. Actinia allows the processing of cloud-based data, for example all Landsat 4-8 scenes as well as all Sentinel-2 scenes in ephemeral databases. The computational results of ephemeral processing are available via object storage as GeoTIFF files.

API documentation

The full API documentation is available here

actinia command execution - actinia shell

There is also an option to interactively control actinia. For details, see here.

Installation

Required system packages:

  • alpine: apk add python3 py3-pip As not all python packages are pre-build for alpine, they need to be build during installation. For this some system packages are required: apk add python3 py3-pip python3-dev gcc musl-dev linux-headers build-base gdal gdal-tools gdal-dev proj proj-util proj-dev geos-dev py3-numpy-dev
  • ubuntu: apt install -y python3 python3-pip

And then install from pypi:

pip install actinia-core

Installation with Docker

Docker images are available from https://hub.docker.com/r/mundialis/actinia-core

docker pull mundialis/actinia-core

For own deployments or local dev-setup, see the docker/ subfolder.

Actinia is also available on OSGeoLive.

Examples

Data management

  • List all locations that are available in the actinia persistent database:
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations"
  • List all mapsets in the location latlong_wgs84:
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets"
  • List all space-time raster datasets (STRDS) in location latlong_wgs84 and mapset Sentinel_timeseries:
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds"
  • List all raster map layers of the STRDS:
curl -u 'demouser:gu3st!pa55w0rd' -X GET "https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds/ndvi_16_5600m/raster_layers"

Landsat and Sentinel-2 NDVI computation

  • Compute the NDVI of the top of athmosphere (TOAR) corrected Landsat4 scene LC80440342016259LGN00:
curl -u 'demouser:gu3st!pa55w0rd' -X POST "https://actinia.mundialis.de/api/v3/landsat_process/LC80440342016259LGN00/TOAR/NDVI"
  • NDVI computation of Sentinel-2A scene S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138:
curl -u 'demouser:gu3st!pa55w0rd' -X POST "https://actinia.mundialis.de/api/v3/sentinel2_process/ndvi/S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138"

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; or, to list the available endpoints on command line, run

# 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

Use pre-commit

It is highly recommended to install and use pre-commit before submitting any new or modified code or any other content. The pre-commit Git hooks set checks validity and executes automated formatting for a range of file formats, including Python. Pre-commit installs all necessary tools in a virtual environment upon first use.

If you never used pre-commit before, you must start by installing it on your system. You only do it once:

python -m pip install pre-commit

Pre-commit must then be activated in the code repository. Change the directory to the root folder and use the install command:

cd <actinia-core_source_dir>

# once per repo
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:

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

Or to target a specific set of files:

pre-commit run --files src/*

The pre-commit hooks set is defined in .pre-commit-config.yaml.

It is possible to temporally disable the pre-commit hooks in the repo, e.g. while working on older branches:

pre-commit uninstall

And to reactivate pre-commit again:

git switch main
pre-commit install

Thanks to all contributors ❤

actinia-core contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

actinia_core-4.14.1.tar.gz (266.7 kB view details)

Uploaded Source

Built Distribution

actinia_core-4.14.1-py3-none-any.whl (357.5 kB view details)

Uploaded Python 3

File details

Details for the file actinia_core-4.14.1.tar.gz.

File metadata

  • Download URL: actinia_core-4.14.1.tar.gz
  • Upload date:
  • Size: 266.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for actinia_core-4.14.1.tar.gz
Algorithm Hash digest
SHA256 a220a78cac0a1ddf7d6156ff508b03cc80689469c151b57e4b07682ecf4341a0
MD5 9ff4279d288064ad60b3016c9d4434d8
BLAKE2b-256 b52c7b67807a32454b498add205a1a0c99e46212b7f0b61b0676e38535314fed

See more details on using hashes here.

File details

Details for the file actinia_core-4.14.1-py3-none-any.whl.

File metadata

File hashes

Hashes for actinia_core-4.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee2204f3271824d76f334676855ef5f371a10045284bd19779faf6bcd95b3df9
MD5 21c3b278ef4e433328d809715ad10525
BLAKE2b-256 e2ef8a5ba617d52bf500729b3b155d94f3703e62ea11c49de82dd77bfbd70843

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page