Package: actinia-core
Actinia — The GRASS GIS REST APISoftwareArticleActiniais an open source REST API for scalable, distributed, high performance
processing of geographical data that mainly usesGRASS GISfor 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.Actiniaallows the processing of cloud based data, for example all Landsat 4-8 scenes as well as all
Sentinel-2 scenes in an ephemeral databases. The computational results of ephemeral processing
are available via object storage as GeoTIFF files.API documentationThe full API documentation is availablehereactinia command execution - actinia shellThere is also an option to interactively control actinia. For details,
seehere.InstallationRequired system packages:alpine:apk add python3 py3-pipAs 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-devubuntu:apt install -y python3 python3-pipAnd then install from pypi:pip install actinia-coreInstallation with DockerDocker images are available fromhttps://hub.docker.com/r/mundialis/actinia-coredocker pull mundialis/actinia-coreFor own deployments or local dev-setup, see thedocker/subfolder.Actinia is also available onOSGeoLive.ExamplesData managementList all locations that are available in the actinia persistent database:curl-u'demouser:gu3st!pa55w0rd'-XGET"https://actinia.mundialis.de/api/v3/locations"List all mapsets in the location latlong_wgs84:curl-u'demouser:gu3st!pa55w0rd'-XGET"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'-XGET"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'-XGET"https://actinia.mundialis.de/api/v3/locations/latlong_wgs84/mapsets/modis_ndvi_global/strds/ndvi_16_5600m/raster_layers"Landsat and Sentinel-2 NDVI computationCompute the NDVI of the top of athmosphere (TOAR) corrected Landsat4 scene LC80440342016259LGN00:curl-u'demouser:gu3st!pa55w0rd'-XPOST"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'-XPOST"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 endpointsTo see a simplelist of endpoints(and more), consult the "paths" section in theAPI JSON; or, to list the available endpoints on command line, run# sudo npm install -g jsoncurl-u'demouser:gu3st!pa55w0rd'-XGEThttps://actinia.mundialis.de/api/v3/swagger.json|jsonpaths|json-kaDevelopmentUse pre-commitIt is highly recommended to install and usepre-commitbefore 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-mpipinstallpre-commitPre-commit must then be activated in the code repository. Change the directory
to the root folder and use theinstallcommand:cd<actinia-core_source_dir># once per repopre-commitinstallPre-commit will then be automatically triggered by thegit commitcommand. If
it finds any problem it will abort the commit and try to solve it automatically.
In that case review the changes and run againgit addandgit commit.It is also possible to run pre-commit manually, e.g:pre-commitrunflake8--all-files
pre-commitrunblack--all-files# pre-commit run yamllint --all-files# pre-commit run markdownlint --all-filesOr to target a specific set of files:pre-commitrun--filessrc/*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-commituninstallAnd to reactivate pre-commit again:gitswitchmain
pre-commitinstallThanks to all contributors ❤