404
+ +Page not found
+ + +diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html new file mode 100644 index 000000000..9e39582cc --- /dev/null +++ b/404.html @@ -0,0 +1,138 @@ + + +
+ + + + +Page not found
+ + +Actinia is fully documented using the OpenAPI standard^1, better known +as swagger^2. The JSON definition of the API can be accessed here:
+https://actinia.mundialis.de/latest/swagger.json
+A nicely rendered ReDoc version is available here:
+https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json
+ + +To generate a readable documentation out of the swagger.json file, the +spectacle tool can be used:
+ # Download the latest swagger definition from the actinia service
+ wget https://actinia.mundialis.de/latest/swagger.json -O /tmp/actinia.json
+
+ # Run spectacle docker image to generate the HTML documentation
+ docker run -v /tmp:/tmp -t sourcey/spectacle spectacle /tmp/actinia.json -t /tmp
+
+ # Start Firefox to show the documentation
+ firefox /tmp/index.html
+
+The petstore swagger UI creator^3 can be used to show all available +REST API calls and all response models in a convenient way.
+Actinia uses the concept of users, user-roles and user-groups to manage +the access to the actinia databases and API calls. A single user has +always a specific user role and can be member of one single user-group.
+The following user-roles are supported:
+Overview table:
+task | +superadmin | +admin | +user | +guest | +notes | +
---|---|---|---|---|---|
amount raster cells is unlimited | +y | +y | +limited, selected via redis | +limited, selected via redis | +- | +
database access is unlimited | +y | +only to persistent databases that were granted by a superadmin | +limited, defined in redis | +limited, defined in redis | +- | +
project/mapset access is unlimited | +y | +y | +can create, modify and delete projects/mapsets in user specific databases, defined in redis | +has access to persistent databases that were granted by a superadmin, defined in redis | +- | +
module access is unlimited | +y | +y | +can run computational tasks in ephemeral and user specific databases | +has very limited access to API calls | +- | +
get, create, delete a single user | +y | +users with the maximum user-role user of the same user group | +n | +n | +Only normal users (role=user can be created) | +
In the file actinia.cfg, limits and more can be defined:
+[LIMITS]
+max_cell_limit = 2000000
+process_time_limt = 60
+process_num_limit = 20
+number_of_workers = 3
+
+Actinia manages GRASS GIS projects in its persistent database. User +are not permitted to modify data in the actinia persistent database, but +can access all data read-only for processing and visualization. Data in +the persistent database can only be accessed via HTTP GET API calls.
+The user can either process data in an ephemeral databases, that will +be removed after the processing is finished, or in a user specific +database. A user specific database is persistent, only visible to users +of the same user-group and can contain any data the user has +imported. The user can read-access all data from the persistent database +while running analysis in the ephemeral database or user specific +database.
+Summary
+Footnotes
+ +https://github.com/actinia-org/actinia-core/graphs/contributors
+ +https://github.com/actinia-org/actinia-core/blob/main/CHANGELOG.md
+ +Actinia is an open source REST API for scalable, distributed, high +performance processing of geographical data that 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 an +ephemeral databases. The computational results of ephemeral processing +are available via object storage as GeoTIFF files.
+The full API documentation is available here: https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json. +The source code is available here: https://github.com/actinia-org/actinia-core.
+Requirements: docker and docker-compose
+To build and deploy actinia, run
+git clone https://github.com/mundialis/actinia-core.git
+cd actinia-core
+docker-compose -f docker/docker-compose.yml up
+
+Now you have a running actinia instance locally! Check with
+curl http://127.0.0.1:8088/api/v3/version
+
+A local installation requires a full GRASS GIS installation. Make sure +all requirements are fulfilled to compile GRASS GIS from the git +repository.
+These installation instructions are based on a Ubuntu Linux system (other +operating systems and distributions are fine, too).
+First install PROJ and GRASS GIS by downloading the latest packages +and GRASS GIS git version and compile it.
+sudo apt-get update
+sudo apt-get install proj-bin proj-data
+
+Note that this step changes python
to point to python3
, system-wide:
# recommended to give Python3 precedence over Python2 (which is end-of-life since 2019)
+sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
+
+# or some other project of your choice, /tmp will not keep data between reboots
+cd /tmp
+
+# fetch weekly generated latest snapshot of GRASS GIS stable
+wget https://grass.osgeo.org/grass80/source/snapshot/grass-8.0.git_src_snapshot_latest.tar.gz
+tar xzvf grass-8.0.git_src_snapshot_latest.tar.gz
+mv grass-8.0.git_src_snapshot_????_??_?? grass
+rm -f grass-8.0.git_src_snapshot_latest.tar.gz
+
+cd grass
+
+# production related compilation flags (no debugging enabled)
+export CFLAGS="-O2 -std=gnu99 -fexceptions -fstack-protector -m64"
+export CXXFLAGS="-O2"
+export LDFLAGS="-Wl,--no-undefined -Wl,-z,now"
+
+./configure \
+ --with-cxx \
+ --enable-largefile \
+ --with-proj-share=/usr/share/proj \
+ --with-gdal \
+ --with-geos \
+ --with-sqlite \
+ --with-cairo --with-cairo-ldflags=-lfontconfig \
+ --with-fftw \
+ --with-netcdf \
+ --with-bzlib \
+ --with-zstd \
+ --without-postgres \
+ --without-freetype \
+ --without-openmp \
+ --without-opengl \
+ --without-nls \
+ --without-mysql \
+ --without-odbc \
+ --without-openmp \
+ --prefix=/usr/local
+
+make -j8
+sudo make install
+
+cd temporal/
+git clone https://github.com/mundialis/t.rast.sample
+cd t.rast.sample
+make
+cd ../..
+sudo make install
+
+# t.rast.udf
+# see https://github.com/mundialis/openeo-addons
+
+cd display/
+git clone https://github.com/mundialis/d_rast_multi d.rast.multi
+cd d.rast.multi
+make
+cd ../..
+sudo make install
+
+mkdir -p $HOME/actinia/grassdb
+cd $HOME/actinia/grassdb
+wget https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_grass7.tar.gz
+tar xzvf nc_spm_08_grass7.tar.gz
+rm -f nc_spm_08_grass7.tar.gz
+mv nc_spm_08_grass7 nc_spm_08
+
+wget https://storage.googleapis.com/datentransfer/ECAD.tar.gz
+tar xzvf ECAD.tar.gz
+rm -f ECAD.tar.gz
+
+wget https://storage.googleapis.com/datentransfer/LL.tar.gz
+tar xzvf LL.tar.gz
+rm -f LL.tar.gz
+mv LL latlong_wgs84
+
+mkdir -p $HOME/actinia/workspace/tmp
+
+cd /tmp
+
+git clone https://github.com/actinia-org/actinia-core.git actinia_core
+cd actinia_core
+pip install .
+
+mkdir -p $HOME/actinia/workspace/tmp
+
+cd /tmp
+
+git clone https://github.com/actinia-org/actinia-api.git actinia-api
+cd actinia-api
+python setup.py install
+
+cd /tmp
+
+# install and start redis server
+apt-get install -y redis
+redis-server &
+
+# Create the superuser
+actinia-user create -u superadmin -w abcdefgh -r superadmin -g admin -c 100000000000 -n 1000 -t 6000
+
+# Start the actinia service with
+actinia-server --host 0.0.0.0 --port 5000
+
+ACTINIA_VERSION="v3"
+export ACTINIA_URL="http://localhost:5000/api/${ACTINIA_VERSION}"
+export AUTH='-u superadmin:abcdefgh'
+
+curl ${AUTH} -X GET ${ACTINIA_URL}/projects
+
+The curl
command call should report back:
{"projects":["nc_spm_08","ECAD","latlong_wgs84"],"status":"success"}
+
+Success and welcome to actinia!
+ +Actinia is a REST service to process geographical data that can be +managed by the GRASS GIS software system. The software is designed to +expose a GRASS GIS database and many GRASS GIS^1 processing tools as +REST service^2. Hence, access to GRASS resources like raster maps, +space-time raster datasets, processing and analysis modules are +available via URL. In addition Actinia allows the processing of cloud +based data, for example all Landsat 4-8 scenes as well as all +Sentinel-2A scenes in an ephemeral database. The computational results +of ephemeral processing are available via object storage as GeoTIFF +files.
+The actinia service consists of the actinia core that provides the +basic but sophisticated processing service and actinia plugins that +provide problem specific services like Sentinel-2 and Landsat NDVI +computation, spatio-temporal statistical analysis and many more.
+To use actinia the user must have an understanding of the GRASS GIS +concept^3 of project, mapsets, raster maps, space-time datasets and +modules. The URLs that provide access to the GRASS database reflect +these concepts. Hence, the project, the mapset and the required raster map +are part of the URL to access the service.
+The Representational state transfer (REST)^4 is an architectural style +based on HTTP^5 that uses GET^6, DELETE^7, POST^8 and PUT^9 +methods to manipulate and receive resources with stateless operations.
+While GET requests can be send easily from a browser, POST, PUT or +DELETE request can not. To access the full potential of actinia you will +need a HTTP client, that talks all HTTP communication methods.
+We will use the Unix shell and curl to access the REST API. First open a +shell of choice (we use bash here) and setup the login information, the +IP address and the port on which the actinia service is running, so you +can simply change the IP and port if your server uses a different +address:
+export ACTINIA_URL=https://actinia.mundialis.de/latest
+export AUTH='-u demouser:gu3st!pa55w0rd'
+# other user credentials can be provided in the same way
+
+Data management
+List all projects that are available in the actinia persistent database:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects"
+
+List all mapsets in the project latlong_wgs84:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/latlong_wgs84/mapsets"
+
+List all raster layers in project latlong_wgs84 and mapset Sentinel2A:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/latlong_wgs84/mapsets/Sentinel2A/raster_layers"
+
+List all space-time raster datasets (STRDS) in project +ECAD and mapset PERMANENT:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds"
+
+List all raster map layers of the STRDS precipitation_1950_2013_yearly_mm:
+curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds/precipitation_1950_2013_yearly_mm/raster_layers"
+
+Landsat and Sentinel-2A NDVI computation
+This API call will compute the NDVI of the top of athmosphere (TOAR) +corrected Landsat4 scene LC80440342016259LGN00:
+curl ${AUTH} -X POST "${ACTINIA_URL}/landsat_process/LC80440342016259LGN00/TOAR/NDVI"
+
+NDVI computation of Sentinel-2A scene +S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138:
+curl ${AUTH} -X POST "${ACTINIA_URL}/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.
+Footnotes
+ +GNU GENERAL PUBLIC LICENSE
+Version 3, 29 June 2007
+See: https://raw.githubusercontent.com/mundialis/actinia_core/main/LICENSE.txt
+ +' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/search/search_index.json b/search/search_index.json new file mode 100644 index 000000000..e49c61bcf --- /dev/null +++ b/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Actinia - The GRASS GIS REST API Fork Me On GitHub Actinia is an open source REST API for scalable, distributed, high performance processing of geographical data that 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 an ephemeral databases. The computational results of ephemeral processing are available via object storage as GeoTIFF files. The full API documentation is available here: https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json . The source code is available here: https://github.com/actinia-org/actinia-core . Introduction What is REST? Examples Actinia concepts Actinia REST API documentation User, user-roles and user-groups The Actinia databases Installation Actinia database access Using curl for HTTP requests Access to projects and mapsets in the persistent database Access to raster layers in the persistent database Access to raster time-series in the persistent database Time-series sampling Sampling of a STRDS with vector points User defined processing The actinia process chain Sentinel-2A NDVI process chain License Authors","title":"Home"},{"location":"#actinia-the-grass-gis-rest-api","text":"Fork Me On GitHub Actinia is an open source REST API for scalable, distributed, high performance processing of geographical data that 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 an ephemeral databases. The computational results of ephemeral processing are available via object storage as GeoTIFF files. The full API documentation is available here: https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json . The source code is available here: https://github.com/actinia-org/actinia-core . Introduction What is REST? Examples Actinia concepts Actinia REST API documentation User, user-roles and user-groups The Actinia databases Installation Actinia database access Using curl for HTTP requests Access to projects and mapsets in the persistent database Access to raster layers in the persistent database Access to raster time-series in the persistent database Time-series sampling Sampling of a STRDS with vector points User defined processing The actinia process chain Sentinel-2A NDVI process chain License Authors","title":"Actinia - The GRASS GIS REST API"},{"location":"actinia_concepts/","text":"Actinia Basics Actinia REST API documentation Actinia is fully documented using the OpenAPI standard ^1 , better known as swagger ^2 . The JSON definition of the API can be accessed here: https://actinia.mundialis.de/latest/swagger.json A nicely rendered ReDoc version is available here: https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json To generate a readable documentation out of the swagger.json file, the spectacle tool can be used: # Download the latest swagger definition from the actinia service wget https://actinia.mundialis.de/latest/swagger.json -O /tmp/actinia.json # Run spectacle docker image to generate the HTML documentation docker run -v /tmp:/tmp -t sourcey/spectacle spectacle /tmp/actinia.json -t /tmp # Start Firefox to show the documentation firefox /tmp/index.html The petstore swagger UI creator ^3 can be used to show all available REST API calls and all response models in a convenient way. User, user-roles and user-groups Actinia uses the concept of users, user-roles and user-groups to manage the access to the actinia databases and API calls. A single user has always a specific user role and can be member of one single user-group. The following user-roles are supported: 1. superadmin Can create, modify and delete users with all user-roles Has access to all API calls and read/write access to all databases 2. admin Can access all API calls Can create, modify and delete users with the maximum user-role user of the same user group Has access to persistent databases that were granted by a superadmin 3. user Can run computational tasks in ephemeral and user specific databases Can create, modify and delete projects in a user specific database Can create, modify and delete mapsets in user specific databases Has limited access to API calls Can not create, modify or delete users Has access to persistent databases that were granted by a superadmin 4. guest Has very limited access to API calls Can not create, modify or delete mapsets Can not create, modify or delete users Has access to persistent databases that were granted by a superadmin Overview table: task superadmin admin user guest notes amount raster cells is unlimited y y limited, selected via redis limited, selected via redis - database access is unlimited y only to persistent databases that were granted by a superadmin limited, defined in redis limited, defined in redis - project/mapset access is unlimited y y can create, modify and delete projects/mapsets in user specific databases, defined in redis has access to persistent databases that were granted by a superadmin, defined in redis - module access is unlimited y y can run computational tasks in ephemeral and user specific databases has very limited access to API calls - get, create, delete a single user y users with the maximum user-role user of the same user group n n Only normal users (role=user can be created) In the file actinia.cfg, limits and more can be defined: [LIMITS] max_cell_limit = 2000000 process_time_limt = 60 process_num_limit = 20 number_of_workers = 3 The Actinia databases Actinia manages GRASS GIS projects in its persistent database . User are not permitted to modify data in the actinia persistent database, but can access all data read-only for processing and visualization. Data in the persistent database can only be accessed via HTTP GET API calls. The user can either process data in an ephemeral databases , that will be removed after the processing is finished, or in a user specific database . A user specific database is persistent, only visible to users of the same user-group and can contain any data the user has imported. The user can read-access all data from the persistent database while running analysis in the ephemeral database or user specific database. Summary 1. Persistent database Read only database with projects and mapsets that can be used as processing environment and data source Data can only be accessed using HTTP GET API calls 2. Ephemeral database All processing is performed in ephemeral databases for performance and security reasons Ephemeral databases are created for all API calls and removed after the processing is finished Ephemeral databases use persistent databases as processing environments to access required data from mapsets in persistent projects 3. User specific databases Persistent databases that can be created and modified by a specific user group The base for a project in a user specific database can be a project from a persistent database, however mapsets names must be unique. A user group can only access a single database with any number of projects Footnotes","title":"Actinia concepts"},{"location":"actinia_concepts/#actinia-basics","text":"","title":"Actinia Basics"},{"location":"actinia_concepts/#actinia-rest-api-documentation","text":"Actinia is fully documented using the OpenAPI standard ^1 , better known as swagger ^2 . The JSON definition of the API can be accessed here: https://actinia.mundialis.de/latest/swagger.json A nicely rendered ReDoc version is available here: https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json To generate a readable documentation out of the swagger.json file, the spectacle tool can be used: # Download the latest swagger definition from the actinia service wget https://actinia.mundialis.de/latest/swagger.json -O /tmp/actinia.json # Run spectacle docker image to generate the HTML documentation docker run -v /tmp:/tmp -t sourcey/spectacle spectacle /tmp/actinia.json -t /tmp # Start Firefox to show the documentation firefox /tmp/index.html The petstore swagger UI creator ^3 can be used to show all available REST API calls and all response models in a convenient way.","title":"Actinia REST API documentation"},{"location":"actinia_concepts/#user-user-roles-and-user-groups","text":"Actinia uses the concept of users, user-roles and user-groups to manage the access to the actinia databases and API calls. A single user has always a specific user role and can be member of one single user-group. The following user-roles are supported:","title":"User, user-roles and user-groups"},{"location":"actinia_concepts/#1-superadmin","text":"Can create, modify and delete users with all user-roles Has access to all API calls and read/write access to all databases","title":"1. superadmin"},{"location":"actinia_concepts/#2-admin","text":"Can access all API calls Can create, modify and delete users with the maximum user-role user of the same user group Has access to persistent databases that were granted by a superadmin","title":"2. admin"},{"location":"actinia_concepts/#3-user","text":"Can run computational tasks in ephemeral and user specific databases Can create, modify and delete projects in a user specific database Can create, modify and delete mapsets in user specific databases Has limited access to API calls Can not create, modify or delete users Has access to persistent databases that were granted by a superadmin","title":"3. user"},{"location":"actinia_concepts/#4-guest","text":"Has very limited access to API calls Can not create, modify or delete mapsets Can not create, modify or delete users Has access to persistent databases that were granted by a superadmin Overview table: task superadmin admin user guest notes amount raster cells is unlimited y y limited, selected via redis limited, selected via redis - database access is unlimited y only to persistent databases that were granted by a superadmin limited, defined in redis limited, defined in redis - project/mapset access is unlimited y y can create, modify and delete projects/mapsets in user specific databases, defined in redis has access to persistent databases that were granted by a superadmin, defined in redis - module access is unlimited y y can run computational tasks in ephemeral and user specific databases has very limited access to API calls - get, create, delete a single user y users with the maximum user-role user of the same user group n n Only normal users (role=user can be created) In the file actinia.cfg, limits and more can be defined: [LIMITS] max_cell_limit = 2000000 process_time_limt = 60 process_num_limit = 20 number_of_workers = 3","title":"4. guest"},{"location":"actinia_concepts/#the-actinia-databases","text":"Actinia manages GRASS GIS projects in its persistent database . User are not permitted to modify data in the actinia persistent database, but can access all data read-only for processing and visualization. Data in the persistent database can only be accessed via HTTP GET API calls. The user can either process data in an ephemeral databases , that will be removed after the processing is finished, or in a user specific database . A user specific database is persistent, only visible to users of the same user-group and can contain any data the user has imported. The user can read-access all data from the persistent database while running analysis in the ephemeral database or user specific database. Summary","title":"The Actinia databases"},{"location":"actinia_concepts/#1-persistent-database","text":"Read only database with projects and mapsets that can be used as processing environment and data source Data can only be accessed using HTTP GET API calls","title":"1. Persistent database"},{"location":"actinia_concepts/#2-ephemeral-database","text":"All processing is performed in ephemeral databases for performance and security reasons Ephemeral databases are created for all API calls and removed after the processing is finished Ephemeral databases use persistent databases as processing environments to access required data from mapsets in persistent projects","title":"2. Ephemeral database"},{"location":"actinia_concepts/#3-user-specific-databases","text":"Persistent databases that can be created and modified by a specific user group The base for a project in a user specific database can be a project from a persistent database, however mapsets names must be unique. A user group can only access a single database with any number of projects Footnotes","title":"3. User specific databases"},{"location":"authors/","text":"See https://github.com/actinia-org/actinia-core/graphs/contributors","title":"Authors"},{"location":"authors/#see","text":"https://github.com/actinia-org/actinia-core/graphs/contributors","title":"See"},{"location":"changelog/","text":"See https://github.com/actinia-org/actinia-core/blob/main/CHANGELOG.md","title":"See"},{"location":"changelog/#see","text":"https://github.com/actinia-org/actinia-core/blob/main/CHANGELOG.md","title":"See"},{"location":"installation/","text":"Installation Installation with docker Requirements: docker and docker-compose To build and deploy actinia, run git clone https://github.com/mundialis/actinia-core.git cd actinia-core docker-compose -f docker/docker-compose.yml up Now you have a running actinia instance locally! Check with curl http://127.0.0.1:8088/api/v3/version For how to add data to this setup, how to run actinia locally with most recent GRASS GIS or how to fix common startup errors, see more details in docker README . Local installation A local installation requires a full GRASS GIS installation. Make sure all requirements are fulfilled to compile GRASS GIS from the git repository. These installation instructions are based on a Ubuntu Linux system (other operating systems and distributions are fine, too). First install PROJ and GRASS GIS by downloading the latest packages and GRASS GIS git version and compile it. Install the latest projection library sudo apt-get update sudo apt-get install proj-bin proj-data Set Python 3 environment Note that this step changes python to point to python3 , system-wide: # recommended to give Python3 precedence over Python2 (which is end-of-life since 2019) sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1 Compile and install GRASS GIS and additional modules: # or some other project of your choice, /tmp will not keep data between reboots cd /tmp # fetch weekly generated latest snapshot of GRASS GIS stable wget https://grass.osgeo.org/grass80/source/snapshot/grass-8.0.git_src_snapshot_latest.tar.gz tar xzvf grass-8.0.git_src_snapshot_latest.tar.gz mv grass-8.0.git_src_snapshot_????_??_?? grass rm -f grass-8.0.git_src_snapshot_latest.tar.gz cd grass # production related compilation flags (no debugging enabled) export CFLAGS=\"-O2 -std=gnu99 -fexceptions -fstack-protector -m64\" export CXXFLAGS=\"-O2\" export LDFLAGS=\"-Wl,--no-undefined -Wl,-z,now\" ./configure \\ --with-cxx \\ --enable-largefile \\ --with-proj-share=/usr/share/proj \\ --with-gdal \\ --with-geos \\ --with-sqlite \\ --with-cairo --with-cairo-ldflags=-lfontconfig \\ --with-fftw \\ --with-netcdf \\ --with-bzlib \\ --with-zstd \\ --without-postgres \\ --without-freetype \\ --without-openmp \\ --without-opengl \\ --without-nls \\ --without-mysql \\ --without-odbc \\ --without-openmp \\ --prefix=/usr/local make -j8 sudo make install cd temporal/ git clone https://github.com/mundialis/t.rast.sample cd t.rast.sample make cd ../.. sudo make install # t.rast.udf # see https://github.com/mundialis/openeo-addons cd display/ git clone https://github.com/mundialis/d_rast_multi d.rast.multi cd d.rast.multi make cd ../.. sudo make install Download the test datasets (\"projects\") and place them into a specific directory that will be used by actinia as a persistent database: mkdir -p $HOME/actinia/grassdb cd $HOME/actinia/grassdb wget https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_grass7.tar.gz tar xzvf nc_spm_08_grass7.tar.gz rm -f nc_spm_08_grass7.tar.gz mv nc_spm_08_grass7 nc_spm_08 wget https://storage.googleapis.com/datentransfer/ECAD.tar.gz tar xzvf ECAD.tar.gz rm -f ECAD.tar.gz wget https://storage.googleapis.com/datentransfer/LL.tar.gz tar xzvf LL.tar.gz rm -f LL.tar.gz mv LL latlong_wgs84 Actinia Core must be installed and run within a (virtual) Python3 environment: mkdir -p $HOME/actinia/workspace/tmp cd /tmp git clone https://github.com/actinia-org/actinia-core.git actinia_core cd actinia_core pip install . Actinia API must be installed and run within a (virtual) Python3 environment: mkdir -p $HOME/actinia/workspace/tmp cd /tmp git clone https://github.com/actinia-org/actinia-api.git actinia-api cd actinia-api python setup.py install Make sure that a redis service is running and create a user with actinia-user tool cd /tmp # install and start redis server apt-get install -y redis redis-server & # Create the superuser actinia-user create -u superadmin -w abcdefgh -r superadmin -g admin -c 100000000000 -n 1000 -t 6000 # Start the actinia service with actinia-server --host 0.0.0.0 --port 5000 Check the service with curl ACTINIA_VERSION=\"v3\" export ACTINIA_URL=\"http://localhost:5000/api/${ACTINIA_VERSION}\" export AUTH='-u superadmin:abcdefgh' curl ${AUTH} -X GET ${ACTINIA_URL}/projects The curl command call should report back: {\"projects\":[\"nc_spm_08\",\"ECAD\",\"latlong_wgs84\"],\"status\":\"success\"} Success and welcome to actinia!","title":"Installation"},{"location":"installation/#installation","text":"","title":"Installation"},{"location":"installation/#installation-with-docker","text":"Requirements: docker and docker-compose To build and deploy actinia, run git clone https://github.com/mundialis/actinia-core.git cd actinia-core docker-compose -f docker/docker-compose.yml up Now you have a running actinia instance locally! Check with curl http://127.0.0.1:8088/api/v3/version For how to add data to this setup, how to run actinia locally with most recent GRASS GIS or how to fix common startup errors, see more details in docker README .","title":"Installation with docker"},{"location":"installation/#local-installation","text":"A local installation requires a full GRASS GIS installation. Make sure all requirements are fulfilled to compile GRASS GIS from the git repository. These installation instructions are based on a Ubuntu Linux system (other operating systems and distributions are fine, too). First install PROJ and GRASS GIS by downloading the latest packages and GRASS GIS git version and compile it. Install the latest projection library sudo apt-get update sudo apt-get install proj-bin proj-data Set Python 3 environment Note that this step changes python to point to python3 , system-wide: # recommended to give Python3 precedence over Python2 (which is end-of-life since 2019) sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1 Compile and install GRASS GIS and additional modules: # or some other project of your choice, /tmp will not keep data between reboots cd /tmp # fetch weekly generated latest snapshot of GRASS GIS stable wget https://grass.osgeo.org/grass80/source/snapshot/grass-8.0.git_src_snapshot_latest.tar.gz tar xzvf grass-8.0.git_src_snapshot_latest.tar.gz mv grass-8.0.git_src_snapshot_????_??_?? grass rm -f grass-8.0.git_src_snapshot_latest.tar.gz cd grass # production related compilation flags (no debugging enabled) export CFLAGS=\"-O2 -std=gnu99 -fexceptions -fstack-protector -m64\" export CXXFLAGS=\"-O2\" export LDFLAGS=\"-Wl,--no-undefined -Wl,-z,now\" ./configure \\ --with-cxx \\ --enable-largefile \\ --with-proj-share=/usr/share/proj \\ --with-gdal \\ --with-geos \\ --with-sqlite \\ --with-cairo --with-cairo-ldflags=-lfontconfig \\ --with-fftw \\ --with-netcdf \\ --with-bzlib \\ --with-zstd \\ --without-postgres \\ --without-freetype \\ --without-openmp \\ --without-opengl \\ --without-nls \\ --without-mysql \\ --without-odbc \\ --without-openmp \\ --prefix=/usr/local make -j8 sudo make install cd temporal/ git clone https://github.com/mundialis/t.rast.sample cd t.rast.sample make cd ../.. sudo make install # t.rast.udf # see https://github.com/mundialis/openeo-addons cd display/ git clone https://github.com/mundialis/d_rast_multi d.rast.multi cd d.rast.multi make cd ../.. sudo make install Download the test datasets (\"projects\") and place them into a specific directory that will be used by actinia as a persistent database: mkdir -p $HOME/actinia/grassdb cd $HOME/actinia/grassdb wget https://grass.osgeo.org/sampledata/north_carolina/nc_spm_08_grass7.tar.gz tar xzvf nc_spm_08_grass7.tar.gz rm -f nc_spm_08_grass7.tar.gz mv nc_spm_08_grass7 nc_spm_08 wget https://storage.googleapis.com/datentransfer/ECAD.tar.gz tar xzvf ECAD.tar.gz rm -f ECAD.tar.gz wget https://storage.googleapis.com/datentransfer/LL.tar.gz tar xzvf LL.tar.gz rm -f LL.tar.gz mv LL latlong_wgs84 Actinia Core must be installed and run within a (virtual) Python3 environment: mkdir -p $HOME/actinia/workspace/tmp cd /tmp git clone https://github.com/actinia-org/actinia-core.git actinia_core cd actinia_core pip install . Actinia API must be installed and run within a (virtual) Python3 environment: mkdir -p $HOME/actinia/workspace/tmp cd /tmp git clone https://github.com/actinia-org/actinia-api.git actinia-api cd actinia-api python setup.py install Make sure that a redis service is running and create a user with actinia-user tool cd /tmp # install and start redis server apt-get install -y redis redis-server & # Create the superuser actinia-user create -u superadmin -w abcdefgh -r superadmin -g admin -c 100000000000 -n 1000 -t 6000 # Start the actinia service with actinia-server --host 0.0.0.0 --port 5000 Check the service with curl ACTINIA_VERSION=\"v3\" export ACTINIA_URL=\"http://localhost:5000/api/${ACTINIA_VERSION}\" export AUTH='-u superadmin:abcdefgh' curl ${AUTH} -X GET ${ACTINIA_URL}/projects The curl command call should report back: {\"projects\":[\"nc_spm_08\",\"ECAD\",\"latlong_wgs84\"],\"status\":\"success\"} Success and welcome to actinia!","title":"Local installation"},{"location":"introduction/","text":"Introduction Actinia is a REST service to process geographical data that can be managed by the GRASS GIS software system. The software is designed to expose a GRASS GIS database and many GRASS GIS ^1 processing tools as REST service ^2 . Hence, access to GRASS resources like raster maps, space-time raster datasets, processing and analysis modules are available via URL. In addition Actinia allows the processing of cloud based data, for example all Landsat 4-8 scenes as well as all Sentinel-2A scenes in an ephemeral database. The computational results of ephemeral processing are available via object storage as GeoTIFF files. The actinia service consists of the actinia core that provides the basic but sophisticated processing service and actinia plugins that provide problem specific services like Sentinel-2 and Landsat NDVI computation, spatio-temporal statistical analysis and many more. To use actinia the user must have an understanding of the GRASS GIS concept ^3 of project, mapsets, raster maps, space-time datasets and modules. The URLs that provide access to the GRASS database reflect these concepts. Hence, the project, the mapset and the required raster map are part of the URL to access the service. What is REST? The Representational state transfer (REST) ^4 is an architectural style based on HTTP ^5 that uses GET ^6 , DELETE ^7 , POST ^8 and PUT ^9 methods to manipulate and receive resources with stateless operations. While GET requests can be send easily from a browser, POST, PUT or DELETE request can not. To access the full potential of actinia you will need a HTTP client, that talks all HTTP communication methods. Examples We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different address: export ACTINIA_URL=https://actinia.mundialis.de/latest export AUTH='-u demouser:gu3st!pa55w0rd' # other user credentials can be provided in the same way Data management List all projects that are available in the actinia persistent database: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects\" List all mapsets in the project latlong_wgs84: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/latlong_wgs84/mapsets\" List all raster layers in project latlong_wgs84 and mapset Sentinel2A: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/latlong_wgs84/mapsets/Sentinel2A/raster_layers\" List all space-time raster datasets (STRDS) in project ECAD and mapset PERMANENT: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds\" List all raster map layers of the STRDS precipitation_1950_2013_yearly_mm: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds/precipitation_1950_2013_yearly_mm/raster_layers\" Landsat and Sentinel-2A NDVI computation This API call will compute the NDVI of the top of athmosphere (TOAR) corrected Landsat4 scene LC80440342016259LGN00: curl ${AUTH} -X POST \"${ACTINIA_URL}/landsat_process/LC80440342016259LGN00/TOAR/NDVI\" NDVI computation of Sentinel-2A scene S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138: curl ${AUTH} -X POST \"${ACTINIA_URL}/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. Footnotes","title":"Introduction"},{"location":"introduction/#introduction","text":"Actinia is a REST service to process geographical data that can be managed by the GRASS GIS software system. The software is designed to expose a GRASS GIS database and many GRASS GIS ^1 processing tools as REST service ^2 . Hence, access to GRASS resources like raster maps, space-time raster datasets, processing and analysis modules are available via URL. In addition Actinia allows the processing of cloud based data, for example all Landsat 4-8 scenes as well as all Sentinel-2A scenes in an ephemeral database. The computational results of ephemeral processing are available via object storage as GeoTIFF files. The actinia service consists of the actinia core that provides the basic but sophisticated processing service and actinia plugins that provide problem specific services like Sentinel-2 and Landsat NDVI computation, spatio-temporal statistical analysis and many more. To use actinia the user must have an understanding of the GRASS GIS concept ^3 of project, mapsets, raster maps, space-time datasets and modules. The URLs that provide access to the GRASS database reflect these concepts. Hence, the project, the mapset and the required raster map are part of the URL to access the service.","title":"Introduction"},{"location":"introduction/#what-is-rest","text":"The Representational state transfer (REST) ^4 is an architectural style based on HTTP ^5 that uses GET ^6 , DELETE ^7 , POST ^8 and PUT ^9 methods to manipulate and receive resources with stateless operations. While GET requests can be send easily from a browser, POST, PUT or DELETE request can not. To access the full potential of actinia you will need a HTTP client, that talks all HTTP communication methods.","title":"What is REST?"},{"location":"introduction/#examples","text":"We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different address: export ACTINIA_URL=https://actinia.mundialis.de/latest export AUTH='-u demouser:gu3st!pa55w0rd' # other user credentials can be provided in the same way Data management List all projects that are available in the actinia persistent database: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects\" List all mapsets in the project latlong_wgs84: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/latlong_wgs84/mapsets\" List all raster layers in project latlong_wgs84 and mapset Sentinel2A: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/latlong_wgs84/mapsets/Sentinel2A/raster_layers\" List all space-time raster datasets (STRDS) in project ECAD and mapset PERMANENT: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds\" List all raster map layers of the STRDS precipitation_1950_2013_yearly_mm: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds/precipitation_1950_2013_yearly_mm/raster_layers\" Landsat and Sentinel-2A NDVI computation This API call will compute the NDVI of the top of athmosphere (TOAR) corrected Landsat4 scene LC80440342016259LGN00: curl ${AUTH} -X POST \"${ACTINIA_URL}/landsat_process/LC80440342016259LGN00/TOAR/NDVI\" NDVI computation of Sentinel-2A scene S2A_MSIL1C_20170212T104141_N0204_R008_T31TGJ_20170212T104138: curl ${AUTH} -X POST \"${ACTINIA_URL}/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. Footnotes","title":"Examples"},{"location":"license/","text":"License GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 See: https://raw.githubusercontent.com/mundialis/actinia_core/main/LICENSE.txt","title":"License"},{"location":"license/#license","text":"GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 See: https://raw.githubusercontent.com/mundialis/actinia_core/main/LICENSE.txt","title":"License"},{"location":"tutorial_data_access/","text":"Tutorial In the following tutorial we will access the persistent database analysing raster and raster-time-series data. We will use the import and export features of actinia-specific process chains to process Sentinel-2A scenes with several GRASS GIS modules and export the result as GeoTiff files. The following examples shows the REST service access using the command line tool curl ^1 . Curl should be available on many Linux systems. However, tools like postman ^2 allow a more comfortable way to access actinia. Using curl for HTTP requests We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different address: export ACTINIA_URL=https://actinia.mundialis.de/latest export AUTH='-u demouser:gu3st!pa55w0rd' # other user credentials can be provided in the same way Access to projects and mapsets in the persistent database The following API call lists all available projects in the actinia persistent database (the -i includes the HTTP response headers): curl ${AUTH} -X GET -i \"${ACTINIA_URL}/projects\" The output should look similar to this: { \"projects\": [ \"latlong_wgs84\", \"ECAD\", \"nc_spm_08\" ], \"status\": \"success\" } To show the region settings and the projection of the GRASS GIS standard project nc_spm_08 the following REST call must be used: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/nc_spm_08/info\" The JSON response is the standard response of the actinia REST API. Most API calls respond using this JSON structure. The difference between API calls is the result part that is located in the JSON section with the name process_results . The response includes all steps that were executed to receive the projection information and the region information. It is located in the process_log section of the JSON response. In addition API specific information as well as the processing time are available in the response. To make the JSON response more readable you can use parsing-tools like jq. The output should look similar to this then: { \"accept_datetime\": \"2019-08-01 20:30:05.717499\", \"accept_timestamp\": 1564691405.7174985, \"api_info\": { \"endpoint\": \"projectmanagementresourceuser\", \"method\": \"GET\", \"path\": \"/api/v3/projects/nc_spm_08/info\", \"request_url\": \"http://actinia.mundialis.de/api/v3/projects/nc_spm_08/info\" }, \"datetime\": \"2019-08-01 20:30:05.881138\", \"http_code\": 200, \"message\": \"Processing successfully finished\", \"process_chain_list\": [ { \"1\": { \"flags\": \"ug3\", \"module\": \"g.region\" }, \"2\": { \"flags\": \"fw\", \"module\": \"g.proj\" } } ], \"process_log\": [ { \"executable\": \"g.region\", \"parameter\": [ \"-ug3\" ], \"return_code\": 0, \"run_time\": 0.05028104782104492, \"stderr\": [ \"\" ], \"stdout\": \"projection=99\\nzone=0\\nn=221230\\ns=219580\\nw=637740\\ne=639530\\nt=1\\nb=0\\nnsres=1650\\nnsres3=10\\newres=1790\\newres3=10\\ntbres=1\\nrows=1\\nrows3=165\\ncols=1\\ncols3=179\\ndepths=1\\ncells=1\\ncells3=29535\\n\" }, { \"executable\": \"g.proj\", \"parameter\": [ \"-fw\" ], \"return_code\": 0, \"run_time\": 0.05027127265930176, \"stderr\": [ \"\" ], \"stdout\": \"PROJCS[\\\"NAD83(HARN) / North Carolina\\\",GEOGCS[\\\"NAD83(HARN)\\\",DATUM[\\\"NAD83_High_Accuracy_Reference_Network\\\",SPHEROID[\\\"GRS 1980\\\",6378137,298.257222101,AUTHORITY[\\\"EPSG\\\",\\\"7019\\\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\\\"EPSG\\\",\\\"6152\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4152\\\"]],PROJECTION[\\\"Lambert_Conformal_Conic_2SP\\\"],PARAMETER[\\\"standard_parallel_1\\\",36.16666666666666],PARAMETER[\\\"standard_parallel_2\\\",34.33333333333334],PARAMETER[\\\"latitude_of_origin\\\",33.75],PARAMETER[\\\"central_meridian\\\",-79],PARAMETER[\\\"false_easting\\\",609601.22],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"X\\\",EAST],AXIS[\\\"Y\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"3358\\\"]]\\n\" } ], \"process_results\": { \"projection\": \"PROJCS[\\\"NAD83(HARN) / North Carolina\\\",GEOGCS[\\\"NAD83(HARN)\\\",DATUM[\\\"NAD83_High_Accuracy_Reference_Network\\\",SPHEROID[\\\"GRS 1980\\\",6378137,298.257222101,AUTHORITY[\\\"EPSG\\\",\\\"7019\\\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\\\"EPSG\\\",\\\"6152\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4152\\\"]],PROJECTION[\\\"Lambert_Conformal_Conic_2SP\\\"],PARAMETER[\\\"standard_parallel_1\\\",36.16666666666666],PARAMETER[\\\"standard_parallel_2\\\",34.33333333333334],PARAMETER[\\\"latitude_of_origin\\\",33.75],PARAMETER[\\\"central_meridian\\\",-79],PARAMETER[\\\"false_easting\\\",609601.22],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"X\\\",EAST],AXIS[\\\"Y\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"3358\\\"]]\\n\", \"region\": { \"b\": 0.0, \"cells\": 1, \"cells3\": 29535, \"cols\": 1, \"cols3\": 179, \"depths\": 1, \"e\": 639530.0, \"ewres\": 1790.0, \"ewres3\": 10.0, \"n\": 221230.0, \"nsres\": 1650.0, \"nsres3\": 10.0, \"projection\": 99, \"rows\": 1, \"rows3\": 165, \"s\": 219580.0, \"t\": 1.0, \"tbres\": 1.0, \"w\": 637740.0, \"zone\": 0 } }, \"progress\": { \"num_of_steps\": 2, \"step\": 2 }, \"resource_id\": \"resource_id-181a0936-9deb-481c-a1a6-6c9f46f97594\", \"status\": \"finished\", \"time_delta\": 0.16365694999694824, \"timestamp\": 1564691405.8811285, \"urls\": { \"resources\": [], \"status\": \"http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-181a0936-9deb-481c-a1a6-6c9f46f97594\" }, \"user_id\": \"demouser\" } To list all mapsets located in the project nc_spm_08 the following API call is used: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/nc_spm_08/mapsets\" The response of this synchronous call lists all mapsets of the project in the process_results section: { \"accept_datetime\": \"2019-08-01 20:31:11.325953\", \"accept_timestamp\": 1564691471.325952, \"api_info\": { \"endpoint\": \"listmapsetsresource\", \"method\": \"GET\", \"path\": \"/api/v3/projects/nc_spm_08/mapsets\", \"request_url\": \"http://actinia.mundialis.de/api/v3/projects/nc_spm_08/mapsets\" }, \"datetime\": \"2019-08-01 20:31:11.430294\", \"http_code\": 200, \"message\": \"Processing successfully finished\", \"process_chain_list\": [ { \"1\": { \"flags\": \"l\", \"inputs\": { \"separator\": \"newline\" }, \"module\": \"g.mapsets\" } } ], \"process_log\": [ { \"executable\": \"g.mapsets\", \"parameter\": [ \"separator=newline\", \"-l\" ], \"return_code\": 0, \"run_time\": 0.05030035972595215, \"stderr\": [ \"Available mapsets:\", \"\" ], \"stdout\": \"PERMANENT\\nlandsat\\nnew_user_mapset\\n\" } ], \"process_results\": [ \"PERMANENT\", \"landsat\", \"new_user_mapset\" ], \"progress\": { \"num_of_steps\": 1, \"step\": 1 }, \"resource_id\": \"resource_id-8365e42b-8111-4026-abb0-df86677ff3b9\", \"status\": \"finished\", \"time_delta\": 0.10437250137329102, \"timestamp\": 1564691471.4302812, \"urls\": { \"resources\": [], \"status\": \"http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-8365e42b-8111-4026-abb0-df86677ff3b9\" }, \"user_id\": \"demouser\" } Using the following API call will show all information about the mapset PERMANENT : curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/nc_spm_08/mapsets/PERMANENT/info\" The response shows the region of the mapset and the projection of the project in the process_results section: { \"accept_datetime\": \"2019-08-01 20:31:51.665042\", \"accept_timestamp\": 1564691511.6650407, \"api_info\": { \"endpoint\": \"mapsetmanagementresourceuser\", \"method\": \"GET\", \"path\": \"/api/v3/projects/nc_spm_08/mapsets/PERMANENT/info\", \"request_url\": \"http://actinia.mundialis.de/api/v3/projects/nc_spm_08/mapsets/PERMANENT/info\" }, \"datetime\": \"2019-08-01 20:31:51.810266\", \"http_code\": 200, \"message\": \"Processing successfully finished\", \"process_chain_list\": [ { \"1\": { \"flags\": \"ug3\", \"module\": \"g.region\" }, \"2\": { \"flags\": \"fw\", \"module\": \"g.proj\" } } ], \"process_log\": [ { \"executable\": \"g.region\", \"parameter\": [ \"-ug3\" ], \"return_code\": 0, \"run_time\": 0.05028796195983887, \"stderr\": [ \"\" ], \"stdout\": \"projection=99\\nzone=0\\nn=221230\\ns=219580\\nw=637740\\ne=639530\\nt=1\\nb=0\\nnsres=1650\\nnsres3=10\\newres=1790\\newres3=10\\ntbres=1\\nrows=1\\nrows3=165\\ncols=1\\ncols3=179\\ndepths=1\\ncells=1\\ncells3=29535\\n\" }, { \"executable\": \"g.proj\", \"parameter\": [ \"-fw\" ], \"return_code\": 0, \"run_time\": 0.05027055740356445, \"stderr\": [ \"\" ], \"stdout\": \"PROJCS[\\\"NAD83(HARN) / North Carolina\\\",GEOGCS[\\\"NAD83(HARN)\\\",DATUM[\\\"NAD83_High_Accuracy_Reference_Network\\\",SPHEROID[\\\"GRS 1980\\\",6378137,298.257222101,AUTHORITY[\\\"EPSG\\\",\\\"7019\\\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\\\"EPSG\\\",\\\"6152\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4152\\\"]],PROJECTION[\\\"Lambert_Conformal_Conic_2SP\\\"],PARAMETER[\\\"standard_parallel_1\\\",36.16666666666666],PARAMETER[\\\"standard_parallel_2\\\",34.33333333333334],PARAMETER[\\\"latitude_of_origin\\\",33.75],PARAMETER[\\\"central_meridian\\\",-79],PARAMETER[\\\"false_easting\\\",609601.22],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"X\\\",EAST],AXIS[\\\"Y\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"3358\\\"]]\\n\" } ], \"process_results\": { \"projection\": \"PROJCS[\\\"NAD83(HARN) / North Carolina\\\",GEOGCS[\\\"NAD83(HARN)\\\",DATUM[\\\"NAD83_High_Accuracy_Reference_Network\\\",SPHEROID[\\\"GRS 1980\\\",6378137,298.257222101,AUTHORITY[\\\"EPSG\\\",\\\"7019\\\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\\\"EPSG\\\",\\\"6152\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4152\\\"]],PROJECTION[\\\"Lambert_Conformal_Conic_2SP\\\"],PARAMETER[\\\"standard_parallel_1\\\",36.16666666666666],PARAMETER[\\\"standard_parallel_2\\\",34.33333333333334],PARAMETER[\\\"latitude_of_origin\\\",33.75],PARAMETER[\\\"central_meridian\\\",-79],PARAMETER[\\\"false_easting\\\",609601.22],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"X\\\",EAST],AXIS[\\\"Y\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"3358\\\"]]\\n\", \"region\": { \"b\": 0.0, \"cells\": 1, \"cells3\": 29535, \"cols\": 1, \"cols3\": 179, \"depths\": 1, \"e\": 639530.0, \"ewres\": 1790.0, \"ewres3\": 10.0, \"n\": 221230.0, \"nsres\": 1650.0, \"nsres3\": 10.0, \"projection\": 99, \"rows\": 1, \"rows3\": 165, \"s\": 219580.0, \"t\": 1.0, \"tbres\": 1.0, \"w\": 637740.0, \"zone\": 0 } }, \"progress\": { \"num_of_steps\": 2, \"step\": 2 }, \"resource_id\": \"resource_id-d949c5c7-9ab9-4ca9-afbf-6b91d7abec5a\", \"status\": \"finished\", \"time_delta\": 0.14524579048156738, \"timestamp\": 1564691511.8102555, \"urls\": { \"resources\": [], \"status\": \"http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-d949c5c7-9ab9-4ca9-afbf-6b91d7abec5a\" }, \"user_id\": \"demouser\" } Access to raster layers in the persistent database The project ECAD contains yearly climate data (precipitation and temperature) of Europe for 60 years. We list all raster layers of the project ECAD in mapset PERMANENT : curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/raster_layers\" The response lists all raster layers of the mapset in the process_results section: { \"accept_datetime\": \"2018-05-30 09:13:51.627853\", \"accept_timestamp\": 1527671631.6278517, \"api_info\": { \"endpoint\": \"rasterlayersresource\", \"method\": \"GET\", \"path\": \"/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers\", \"request_url\": \"http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers\" }, \"datetime\": \"2018-05-30 09:13:51.745702\", \"http_code\": 200, \"message\": \"Processing successfully finished\", \"process_chain_list\": [ { \"1\": { \"inputs\": { \"mapset\": \"PERMANENT\", \"type\": \"raster\" }, \"module\": \"g.list\" } } ], \"process_log\": [ { \"executable\": \"g.list\", \"parameter\": [ \"mapset=PERMANENT\", \"type=raster\" ], \"return_code\": 0, \"run_time\": 0.05105090141296387, \"stderr\": [ \"\" ], \"stdout\": \"...\" } ], \"process_results\": [ \"precipitation_yearly_mm_0\", \"precipitation_yearly_mm_1\", \"...\", \"precipitation_yearly_mm_61\", \"precipitation_yearly_mm_62\", \"temperature_mean_yearly_celsius_0\", \"temperature_mean_yearly_celsius_1\", \"...\", \"temperature_mean_yearly_celsius_61\", \"temperature_mean_yearly_celsius_62\", ], \"progress\": { \"num_of_steps\": 1, \"step\": 1 }, \"resource_id\": \"resource_id-114c7229-da85-4866-a33e-38172835e05f\", \"status\": \"finished\", \"time_delta\": 0.11787867546081543, \"timestamp\": 1527671631.745685, \"urls\": { \"resources\": [], \"status\": \"http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-114c7229-da85-4866-a33e-38172835e05f\" }, \"user_id\": \"demouser\" } Show info about the raster layer temperature_mean_yearly_celsius_60 : curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/raster_layers/temperature_mean_yearly_celsius_60\" The response lists information about the raster layer temperature_mean_yearly_celsius_60 in the process_results section: { \"accept_datetime\": \"2018-05-30 09:17:15.303480\", \"accept_timestamp\": 1527671835.3034775, \"api_info\": { \"endpoint\": \"rasterlayerresource\", \"method\": \"GET\", \"path\": \"/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers/temperature_mean_yearly_celsius_60\", \"request_url\": \"http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers/temperature_mean_yearly_celsius_60\" }, \"datetime\": \"2018-05-30 09:17:15.437797\", \"http_code\": 200, \"message\": \"Processing successfully finished\", \"process_chain_list\": [ { \"1\": { \"flags\": \"gre\", \"inputs\": { \"map\": \"temperature_mean_yearly_celsius_60@PERMANENT\" }, \"module\": \"r.info\" } } ], \"process_log\": [ { \"executable\": \"r.info\", \"parameter\": [ \"map=temperature_mean_yearly_celsius_60@PERMANENT\", \"-gre\" ], \"return_code\": 0, \"run_time\": 0.05033993721008301, \"stderr\": [ \"\" ], \"stdout\": \"...\" } ], \"process_results\": { \"cells\": \"93264\", \"cols\": \"464\", \"comments\": \"\\\"r.in.gdal --overwrite input=\\\"temperature_mean_yearly_celsius_60.tif\\\"\\\\ output=\\\"temperature_mean_yearly_celsius_60\\\" memory=300 offset=0 num\\\\_digits=0\\\"\", \"creator\": \"\\\"soeren\\\"\", \"database\": \"/actinia/workspace/temp_db/gisdbase_db61f5f149474744ab31bbf86f49b5dc\", \"datatype\": \"DCELL\", \"date\": \"\\\"Fri Dec 29 15:58:10 2017\\\"\", \"description\": \"\\\"generated by r.in.gdal\\\"\", \"east\": \"75.5\", \"ewres\": \"0.25\", \"project\": \"ECAD\", \"map\": \"temperature_mean_yearly_celsius_60\", \"mapset\": \"PERMANENT\", \"max\": \"29.406963562753\", \"min\": \"-16.208384568171\", \"ncats\": \"0\", \"north\": \"75.5\", \"nsres\": \"0.25\", \"rows\": \"201\", \"source1\": \"\\\"\\\"\", \"source2\": \"\\\"\\\"\", \"south\": \"25.25\", \"timestamp\": \"\\\"1 Jan 2010 00:00:00 / 1 Jan 2011 00:00:00\\\"\", \"title\": \"\\\"temperature_mean_yearly_celsius_60\\\"\", \"units\": \"\\\"none\\\"\", \"vdatum\": \"\\\"none\\\"\", \"west\": \"-40.5\" }, \"progress\": { \"num_of_steps\": 1, \"step\": 1 }, \"resource_id\": \"resource_id-7d4f36ba-3410-4281-b3e4-7b4aeff5f978\", \"status\": \"finished\", \"time_delta\": 0.13434433937072754, \"timestamp\": 1527671835.4377818, \"urls\": { \"resources\": [], \"status\": \"http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-7d4f36ba-3410-4281-b3e4-7b4aeff5f978\" }, \"user_id\": \"demouser\" } Access to raster time-series in the persistent database Actinia supports the analysis of time-series data based on the temporal framework of GRASS GIS ^3 , ^4 . A time-series datatype is located in project ECAD with mapsets PERMANENT . The time-series datatype is called space-time raster dataset (strds) and represents a time-stamped series of yearly temperature and precipitation data for Europe. We list all strds with the following API call: curl ${AUTH} -X GET \"${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds\" We receive two strds in the process_results section of the JSON response: { \"accept_datetime\": \"2018-05-30 09:18:16.737226\", \"accept_timestamp\": 1527671896.737225, \"api_info\": { \"endpoint\": \"syncstrdslisterresource\", \"method\": \"GET\", \"path\": \"api/v3/projects/ECAD/mapsets/PERMANENT/strds\", \"request_url\": \"http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/strds\" }, \"datetime\": \"2018-05-30 09:18:17.351918\", \"http_code\": 200, \"message\": \"Processing successfully finished\", \"process_chain_list\": [ { \"1\": { \"inputs\": { \"column\": \"name\", \"type\": \"strds\", \"where\": \"mapset='PERMANENT'\" }, \"module\": \"t.list\" } } ], \"process_log\": [ { \"executable\": \"t.list\", \"parameter\": [ \"type=strds\", \"column=name\", \"where=mapset='PERMANENT'\" ], \"return_code\": 0, \"run_time\": 0.5758285522460938, \"stderr\": [ \"----------------------------------------------\", \"Space time raster datasets with absolute time available in mapsetIn the following tutorial we will access the persistent database +analysing raster and raster-time-series data. We will use the import and +export features of actinia-specific process chains to process +Sentinel-2A scenes with several GRASS GIS modules and export the result +as GeoTiff files.
+The following examples shows the REST service access using the command +line tool curl^1. Curl should be available on many Linux +systems. However, tools like postman^2 allow a more comfortable way +to access actinia.
+We will use the Unix shell and curl to access the REST API. First open a +shell of choice (we use bash here) and setup the login information, the +IP address and the port on which the actinia service is running, so you +can simply change the IP and port if your server uses a different +address:
+export ACTINIA_URL=https://actinia.mundialis.de/latest
+export AUTH='-u demouser:gu3st!pa55w0rd'
+# other user credentials can be provided in the same way
+
+The following API call lists all available projects in the actinia
+persistent database (the -i
includes the HTTP response headers):
curl ${AUTH} -X GET -i "${ACTINIA_URL}/projects"
+
+The output should look similar to this:
+ {
+ "projects": [
+ "latlong_wgs84",
+ "ECAD",
+ "nc_spm_08"
+ ],
+ "status": "success"
+ }
+
+To show the region settings and the projection of the GRASS GIS standard +project nc_spm_08 the following REST call must be used:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/nc_spm_08/info"
+
+The JSON response is the standard response of the actinia REST API. Most +API calls respond using this JSON structure. The difference between API +calls is the result part that is located in the JSON section with the +name process_results. The response includes all steps that were +executed to receive the projection information and the region +information. It is located in the process_log section of the JSON +response. In addition API specific information as well as the processing +time are available in the response. To make the JSON response more readable you can use parsing-tools like jq.
+The output should look similar to this then:
+ {
+ "accept_datetime": "2019-08-01 20:30:05.717499",
+ "accept_timestamp": 1564691405.7174985,
+ "api_info": {
+ "endpoint": "projectmanagementresourceuser",
+ "method": "GET",
+ "path": "/api/v3/projects/nc_spm_08/info",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/nc_spm_08/info"
+ },
+ "datetime": "2019-08-01 20:30:05.881138",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "ug3",
+ "module": "g.region"
+ },
+ "2": {
+ "flags": "fw",
+ "module": "g.proj"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "g.region",
+ "parameter": [
+ "-ug3"
+ ],
+ "return_code": 0,
+ "run_time": 0.05028104782104492,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=99\nzone=0\nn=221230\ns=219580\nw=637740\ne=639530\nt=1\nb=0\nnsres=1650\nnsres3=10\newres=1790\newres3=10\ntbres=1\nrows=1\nrows3=165\ncols=1\ncols3=179\ndepths=1\ncells=1\ncells3=29535\n"
+ },
+ {
+ "executable": "g.proj",
+ "parameter": [
+ "-fw"
+ ],
+ "return_code": 0,
+ "run_time": 0.05027127265930176,
+ "stderr": [
+ ""
+ ],
+ "stdout": "PROJCS[\"NAD83(HARN) / North Carolina\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",36.16666666666666],PARAMETER[\"standard_parallel_2\",34.33333333333334],PARAMETER[\"latitude_of_origin\",33.75],PARAMETER[\"central_meridian\",-79],PARAMETER[\"false_easting\",609601.22],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3358\"]]\n"
+ }
+ ],
+ "process_results": {
+ "projection": "PROJCS[\"NAD83(HARN) / North Carolina\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",36.16666666666666],PARAMETER[\"standard_parallel_2\",34.33333333333334],PARAMETER[\"latitude_of_origin\",33.75],PARAMETER[\"central_meridian\",-79],PARAMETER[\"false_easting\",609601.22],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3358\"]]\n",
+ "region": {
+ "b": 0.0,
+ "cells": 1,
+ "cells3": 29535,
+ "cols": 1,
+ "cols3": 179,
+ "depths": 1,
+ "e": 639530.0,
+ "ewres": 1790.0,
+ "ewres3": 10.0,
+ "n": 221230.0,
+ "nsres": 1650.0,
+ "nsres3": 10.0,
+ "projection": 99,
+ "rows": 1,
+ "rows3": 165,
+ "s": 219580.0,
+ "t": 1.0,
+ "tbres": 1.0,
+ "w": 637740.0,
+ "zone": 0
+ }
+ },
+ "progress": {
+ "num_of_steps": 2,
+ "step": 2
+ },
+ "resource_id": "resource_id-181a0936-9deb-481c-a1a6-6c9f46f97594",
+ "status": "finished",
+ "time_delta": 0.16365694999694824,
+ "timestamp": 1564691405.8811285,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-181a0936-9deb-481c-a1a6-6c9f46f97594"
+ },
+ "user_id": "demouser"
+ }
+
+To list all mapsets located in the project nc_spm_08 the following +API call is used:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/nc_spm_08/mapsets"
+
+The response of this synchronous call lists all mapsets of the project +in the process_results section:
+ {
+ "accept_datetime": "2019-08-01 20:31:11.325953",
+ "accept_timestamp": 1564691471.325952,
+ "api_info": {
+ "endpoint": "listmapsetsresource",
+ "method": "GET",
+ "path": "/api/v3/projects/nc_spm_08/mapsets",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/nc_spm_08/mapsets"
+ },
+ "datetime": "2019-08-01 20:31:11.430294",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "l",
+ "inputs": {
+ "separator": "newline"
+ },
+ "module": "g.mapsets"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "g.mapsets",
+ "parameter": [
+ "separator=newline",
+ "-l"
+ ],
+ "return_code": 0,
+ "run_time": 0.05030035972595215,
+ "stderr": [
+ "Available mapsets:",
+ ""
+ ],
+ "stdout": "PERMANENT\nlandsat\nnew_user_mapset\n"
+ }
+ ],
+ "process_results": [
+ "PERMANENT",
+ "landsat",
+ "new_user_mapset"
+ ],
+ "progress": {
+ "num_of_steps": 1,
+ "step": 1
+ },
+ "resource_id": "resource_id-8365e42b-8111-4026-abb0-df86677ff3b9",
+ "status": "finished",
+ "time_delta": 0.10437250137329102,
+ "timestamp": 1564691471.4302812,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-8365e42b-8111-4026-abb0-df86677ff3b9"
+ },
+ "user_id": "demouser"
+ }
+
+Using the following API call will show all information about the mapset +PERMANENT:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/nc_spm_08/mapsets/PERMANENT/info"
+
+The response shows the region of the mapset and the projection of the +project in the process_results section:
+ {
+ "accept_datetime": "2019-08-01 20:31:51.665042",
+ "accept_timestamp": 1564691511.6650407,
+ "api_info": {
+ "endpoint": "mapsetmanagementresourceuser",
+ "method": "GET",
+ "path": "/api/v3/projects/nc_spm_08/mapsets/PERMANENT/info",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/nc_spm_08/mapsets/PERMANENT/info"
+ },
+ "datetime": "2019-08-01 20:31:51.810266",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "ug3",
+ "module": "g.region"
+ },
+ "2": {
+ "flags": "fw",
+ "module": "g.proj"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "g.region",
+ "parameter": [
+ "-ug3"
+ ],
+ "return_code": 0,
+ "run_time": 0.05028796195983887,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=99\nzone=0\nn=221230\ns=219580\nw=637740\ne=639530\nt=1\nb=0\nnsres=1650\nnsres3=10\newres=1790\newres3=10\ntbres=1\nrows=1\nrows3=165\ncols=1\ncols3=179\ndepths=1\ncells=1\ncells3=29535\n"
+ },
+ {
+ "executable": "g.proj",
+ "parameter": [
+ "-fw"
+ ],
+ "return_code": 0,
+ "run_time": 0.05027055740356445,
+ "stderr": [
+ ""
+ ],
+ "stdout": "PROJCS[\"NAD83(HARN) / North Carolina\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",36.16666666666666],PARAMETER[\"standard_parallel_2\",34.33333333333334],PARAMETER[\"latitude_of_origin\",33.75],PARAMETER[\"central_meridian\",-79],PARAMETER[\"false_easting\",609601.22],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3358\"]]\n"
+ }
+ ],
+ "process_results": {
+ "projection": "PROJCS[\"NAD83(HARN) / North Carolina\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",36.16666666666666],PARAMETER[\"standard_parallel_2\",34.33333333333334],PARAMETER[\"latitude_of_origin\",33.75],PARAMETER[\"central_meridian\",-79],PARAMETER[\"false_easting\",609601.22],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3358\"]]\n",
+ "region": {
+ "b": 0.0,
+ "cells": 1,
+ "cells3": 29535,
+ "cols": 1,
+ "cols3": 179,
+ "depths": 1,
+ "e": 639530.0,
+ "ewres": 1790.0,
+ "ewres3": 10.0,
+ "n": 221230.0,
+ "nsres": 1650.0,
+ "nsres3": 10.0,
+ "projection": 99,
+ "rows": 1,
+ "rows3": 165,
+ "s": 219580.0,
+ "t": 1.0,
+ "tbres": 1.0,
+ "w": 637740.0,
+ "zone": 0
+ }
+ },
+ "progress": {
+ "num_of_steps": 2,
+ "step": 2
+ },
+ "resource_id": "resource_id-d949c5c7-9ab9-4ca9-afbf-6b91d7abec5a",
+ "status": "finished",
+ "time_delta": 0.14524579048156738,
+ "timestamp": 1564691511.8102555,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-d949c5c7-9ab9-4ca9-afbf-6b91d7abec5a"
+ },
+ "user_id": "demouser"
+ }
+
+The project ECAD contains yearly climate data (precipitation and +temperature) of Europe for 60 years. We list all raster layers of the +project ECAD in mapset PERMANENT:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/raster_layers"
+
+The response lists all raster layers of the mapset in the +process_results section:
+ {
+ "accept_datetime": "2018-05-30 09:13:51.627853",
+ "accept_timestamp": 1527671631.6278517,
+ "api_info": {
+ "endpoint": "rasterlayersresource",
+ "method": "GET",
+ "path": "/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers"
+ },
+ "datetime": "2018-05-30 09:13:51.745702",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "inputs": {
+ "mapset": "PERMANENT",
+ "type": "raster"
+ },
+ "module": "g.list"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "g.list",
+ "parameter": [
+ "mapset=PERMANENT",
+ "type=raster"
+ ],
+ "return_code": 0,
+ "run_time": 0.05105090141296387,
+ "stderr": [
+ ""
+ ],
+ "stdout": "..."
+ }
+ ],
+ "process_results": [
+ "precipitation_yearly_mm_0",
+ "precipitation_yearly_mm_1",
+ "...",
+ "precipitation_yearly_mm_61",
+ "precipitation_yearly_mm_62",
+ "temperature_mean_yearly_celsius_0",
+ "temperature_mean_yearly_celsius_1",
+ "...",
+ "temperature_mean_yearly_celsius_61",
+ "temperature_mean_yearly_celsius_62",
+ ],
+ "progress": {
+ "num_of_steps": 1,
+ "step": 1
+ },
+ "resource_id": "resource_id-114c7229-da85-4866-a33e-38172835e05f",
+ "status": "finished",
+ "time_delta": 0.11787867546081543,
+ "timestamp": 1527671631.745685,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-114c7229-da85-4866-a33e-38172835e05f"
+ },
+ "user_id": "demouser"
+ }
+
+Show info about the raster layer +temperature_mean_yearly_celsius_60:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/raster_layers/temperature_mean_yearly_celsius_60"
+
+The response lists information about the raster layer +temperature_mean_yearly_celsius_60 in the process_results +section:
+ {
+ "accept_datetime": "2018-05-30 09:17:15.303480",
+ "accept_timestamp": 1527671835.3034775,
+ "api_info": {
+ "endpoint": "rasterlayerresource",
+ "method": "GET",
+ "path": "/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers/temperature_mean_yearly_celsius_60",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/raster_layers/temperature_mean_yearly_celsius_60"
+ },
+ "datetime": "2018-05-30 09:17:15.437797",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "gre",
+ "inputs": {
+ "map": "temperature_mean_yearly_celsius_60@PERMANENT"
+ },
+ "module": "r.info"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "r.info",
+ "parameter": [
+ "map=temperature_mean_yearly_celsius_60@PERMANENT",
+ "-gre"
+ ],
+ "return_code": 0,
+ "run_time": 0.05033993721008301,
+ "stderr": [
+ ""
+ ],
+ "stdout": "..."
+ }
+ ],
+ "process_results": {
+ "cells": "93264",
+ "cols": "464",
+ "comments": "\"r.in.gdal --overwrite input=\"temperature_mean_yearly_celsius_60.tif\"\\ output=\"temperature_mean_yearly_celsius_60\" memory=300 offset=0 num\\_digits=0\"",
+ "creator": "\"soeren\"",
+ "database": "/actinia/workspace/temp_db/gisdbase_db61f5f149474744ab31bbf86f49b5dc",
+ "datatype": "DCELL",
+ "date": "\"Fri Dec 29 15:58:10 2017\"",
+ "description": "\"generated by r.in.gdal\"",
+ "east": "75.5",
+ "ewres": "0.25",
+ "project": "ECAD",
+ "map": "temperature_mean_yearly_celsius_60",
+ "mapset": "PERMANENT",
+ "max": "29.406963562753",
+ "min": "-16.208384568171",
+ "ncats": "0",
+ "north": "75.5",
+ "nsres": "0.25",
+ "rows": "201",
+ "source1": "\"\"",
+ "source2": "\"\"",
+ "south": "25.25",
+ "timestamp": "\"1 Jan 2010 00:00:00 / 1 Jan 2011 00:00:00\"",
+ "title": "\"temperature_mean_yearly_celsius_60\"",
+ "units": "\"none\"",
+ "vdatum": "\"none\"",
+ "west": "-40.5"
+ },
+ "progress": {
+ "num_of_steps": 1,
+ "step": 1
+ },
+ "resource_id": "resource_id-7d4f36ba-3410-4281-b3e4-7b4aeff5f978",
+ "status": "finished",
+ "time_delta": 0.13434433937072754,
+ "timestamp": 1527671835.4377818,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-7d4f36ba-3410-4281-b3e4-7b4aeff5f978"
+ },
+ "user_id": "demouser"
+ }
+
+Actinia supports the analysis of time-series data based on the temporal +framework of GRASS GIS^3, ^4. A time-series datatype is located in +project ECAD with mapsets PERMANENT. The time-series datatype is +called space-time raster dataset (strds) and represents a time-stamped +series of yearly temperature and precipitation data for Europe.
+We list all strds with the following API call:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds"
+
+We receive two strds in the process_results section of the JSON +response:
+ {
+ "accept_datetime": "2018-05-30 09:18:16.737226",
+ "accept_timestamp": 1527671896.737225,
+ "api_info": {
+ "endpoint": "syncstrdslisterresource",
+ "method": "GET",
+ "path": "api/v3/projects/ECAD/mapsets/PERMANENT/strds",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/strds"
+ },
+ "datetime": "2018-05-30 09:18:17.351918",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "inputs": {
+ "column": "name",
+ "type": "strds",
+ "where": "mapset='PERMANENT'"
+ },
+ "module": "t.list"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "t.list",
+ "parameter": [
+ "type=strds",
+ "column=name",
+ "where=mapset='PERMANENT'"
+ ],
+ "return_code": 0,
+ "run_time": 0.5758285522460938,
+ "stderr": [
+ "----------------------------------------------",
+ "Space time raster datasets with absolute time available in mapset <PERMANENT>:",
+ ""
+ ],
+ "stdout": "precipitation_1950_2013_yearly_mm\ntemperature_mean_1950_2013_yearly_celsius\n"
+ }
+ ],
+ "process_results": [
+ "precipitation_1950_2013_yearly_mm",
+ "temperature_mean_1950_2013_yearly_celsius"
+ ],
+ "progress": {
+ "num_of_steps": 1,
+ "step": 1
+ },
+ "resource_id": "resource_id-827f9272-9aa1-467e-8eba-def7003522e3",
+ "status": "finished",
+ "time_delta": 0.6147146224975586,
+ "timestamp": 1527671897.3519022,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-827f9272-9aa1-467e-8eba-def7003522e3"
+ },
+ "user_id": "demouser"
+ }
+
+Use the following API call to receive information about the strds +temperature_mean_1950_2013_yearly_celsius.
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius"
+
+All relevant information about strds +temperature_mean_1950_2013_yearly_celsius is located in the +process_results section of the JSON response:
+ {
+ "accept_datetime": "2018-05-30 09:19:24.941032",
+ "accept_timestamp": 1527671964.9410288,
+ "api_info": {
+ "endpoint": "strdsmanagementresource",
+ "method": "GET",
+ "path": "/api/v3/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius"
+ },
+ "datetime": "2018-05-30 09:19:25.519419",
+ "http_code": 200,
+ "message": "Information gathering for STRDS <temperature_mean_1950_2013_yearly_celsius> successful",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "g",
+ "inputs": {
+ "input": "temperature_mean_1950_2013_yearly_celsius",
+ "type": "strds"
+ },
+ "module": "t.info"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "t.info",
+ "parameter": [
+ "type=strds",
+ "input=temperature_mean_1950_2013_yearly_celsius",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.513615608215332,
+ "stderr": [
+ ""
+ ],
+ "stdout": "..."
+ }
+ ],
+ "process_results": {
+ "aggregation_type": "None",
+ "bottom": "0.0",
+ "creation_time": "2017-12-29 15:58:06.446519",
+ "creator": "soeren",
+ "east": "75.5",
+ "end_time": "2013-01-01 00:00:00",
+ "ewres_max": "0.25",
+ "ewres_min": "0.25",
+ "granularity": "1 year",
+ "id": "temperature_mean_1950_2013_yearly_celsius@PERMANENT",
+ "map_time": "interval",
+ "mapset": "PERMANENT",
+ "max_max": "31.193529",
+ "max_min": "19.189924",
+ "min_max": "-6.724322",
+ "min_min": "-21.672401",
+ "modification_time": "2017-12-29 15:58:10.919466",
+ "name": "temperature_mean_1950_2013_yearly_celsius",
+ "north": "75.5",
+ "nsres_max": "0.25",
+ "nsres_min": "0.25",
+ "number_of_maps": "63",
+ "raster_register": "raster_map_register_522689142dfe42cbab0721934d66dac3",
+ "semantic_type": "mean",
+ "south": "25.25",
+ "start_time": "1950-01-01 00:00:00",
+ "temporal_type": "absolute",
+ "top": "0.0",
+ "west": "-40.5"
+ },
+ "progress": {
+ "num_of_steps": 1,
+ "step": 1
+ },
+ "resource_id": "resource_id-15acb503-5ef9-4a89-89df-3a1291811a5d",
+ "status": "finished",
+ "time_delta": 0.5784096717834473,
+ "timestamp": 1527671965.519405,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-15acb503-5ef9-4a89-89df-3a1291811a5d"
+ },
+ "user_id": "demouser"
+ }
+
+List all raster layers that are registered in the strds +temperature_mean_1950_2013_yearly_celsius with time-stamps:
+ curl ${AUTH} -X GET "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius/raster_layers"
+
+A list of about 60 raster layers with minimum, maximum values, +time-stamps and spatial extent will be located in the process_results +section of the JSON response:
+ {
+ "accept_datetime": "2018-05-30 09:20:30.633439",
+ "accept_timestamp": 1527672030.6334376,
+ "api_info": {
+ "endpoint": "strdsrastermanagement",
+ "method": "GET",
+ "path": "/api/v3/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius/raster_layers",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius/raster_layers"
+ },
+ "datetime": "2018-05-30 09:20:31.197637",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "u",
+ "inputs": {
+ "columns": "id,start_time,end_time,north,south,east,west,min,max,rows,cols",
+ "input": "temperature_mean_1950_2013_yearly_celsius@PERMANENT",
+ "separator": "|"
+ },
+ "module": "t.rast.list",
+ "outputs": {
+ "output": {
+ "name": "/actinia/workspace/temp_db/gisdbase_ec60c0dd721947e38348f4a07e563b5e/.tmp/tmpah7edtxb"
+ }
+ }
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "t.rast.list",
+ "parameter": [
+ "input=temperature_mean_1950_2013_yearly_celsius@PERMANENT",
+ "columns=id,start_time,end_time,north,south,east,west,min,max,rows,cols",
+ "separator=|",
+ "output=/actinia/workspace/temp_db/gisdbase_ec60c0dd721947e38348f4a07e563b5e/.tmp/tmpah7edtxb",
+ "-u"
+ ],
+ "return_code": 0,
+ "run_time": 0.5160176753997803,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ }
+ ],
+ "process_results": [
+ {
+ "cols": "201",
+ "east": "75.5",
+ "end_time": "1951-01-01 00:00:00",
+ "id": "temperature_mean_yearly_celsius_0@PERMANENT",
+ "max": "20.893369",
+ "min": "-7.705292",
+ "north": "75.5",
+ "rows": "464",
+ "south": "25.25",
+ "start_time": "1950-01-01 00:00:00",
+ "west": "-40.5"
+ },
+ {
+ "..."
+ },
+ {
+ "cols": "201",
+ "east": "75.5",
+ "end_time": "2013-01-01 00:00:00",
+ "id": "temperature_mean_yearly_celsius_62@PERMANENT",
+ "max": "28.581454",
+ "min": "-18.443574",
+ "north": "75.5",
+ "rows": "464",
+ "south": "25.25",
+ "start_time": "2012-01-01 00:00:00",
+ "west": "-40.5"
+ }
+ ],
+ "progress": {
+ "num_of_steps": 1,
+ "step": 1
+ },
+ "resource_id": "resource_id-3661533a-cb2b-4875-ac7a-be97a99e90da",
+ "status": "finished",
+ "time_delta": 0.5642266273498535,
+ "timestamp": 1527672031.1976202,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-3661533a-cb2b-4875-ac7a-be97a99e90da"
+ },
+ "user_id": "demouser"
+ }
+
+Footnotes
+ +Actinia provides several API calls to compute satellite specific +parameters:
+ +We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different +address:
+export ACTINIA_URL=https://actinia.mundialis.de/latest
+export AUTH='-u demouser:gu3st!pa55w0rd'
+# other user credentials can be provided in the same way
+
+The NDVI is an important parameter that is derived from multi-spectral +satellite images. The following asynchronous API call computes the NDVI +of the Landsat8 scene LC80440342016259LGN00 with TOAR top of +atmosphere correction. It is designed to hide the complexity of Landsat +scene downloading, reprojection, atmospheric correction, statistical +analysis and preview rendering in a single call using a self describing +url.
+ curl ${AUTH} -X POST "${ACTINIA_URL}/landsat_process/LC80440342016259LGN00/TOAR/NDVI"
+
+The response contains the status URL that must be polled using a GET +request to show the current processing status and eventually the +processing result.
+ {
+ "accept_datetime": "2018-05-30 10:52:19.545323",
+ "accept_timestamp": 1527677539.5453222,
+ "api_info": {
+ "endpoint": "asyncephemerallandsatprocessingresource",
+ "method": "POST",
+ "path": "/api/v3/landsat_process/LC80440342016259LGN00/TOAR/NDVI",
+ "request_url": "http://actinia.mundialis.de/api/v3/landsat_process/LC80440342016259LGN00/TOAR/NDVI"
+ },
+ "datetime": "2018-05-30 10:52:19.545774",
+ "http_code": 200,
+ "message": "Resource accepted",
+ "process_chain_list": [],
+ "process_results": {},
+ "resource_id": "resource_id-a12d80c1-539a-45b9-a78c-ee4014f50d03",
+ "status": "accepted",
+ "time_delta": 0.000457763671875,
+ "timestamp": 1527677539.5457737,
+ "urls": {
+ "resources": [],
+ "status": "https://actinia.mundialis.de/api/v3/resources/demouser/resource_id-a12d80c1-539a-45b9-a78c-ee4014f50d03"
+ },
+ "user_id": "demouser"
+ }
+
+Request the status of the asynchronous API call by polling the status +URL. Be aware that you have to use your status url as the resource id will change for different NDVI API +calls.
+ curl -L ${AUTH} -X GET "https://actinia.mundialis.de/api/v3/resources/demouser/resource_id-a12d80c1-539a-45b9-a78c-ee4014f50d03"
+
+The final result will contain a complete processing list as well as +URL's to the resulting PNG preview image, the created NDVI GeoTiff file +as well as univariate statistics of the computed NDVI scene.
+ {
+ "accept_datetime": "2018-05-30 11:16:03.033305",
+ "accept_timestamp": 1527678963.033304,
+ "api_info": {
+ "endpoint": "asyncephemerallandsatprocessingresource",
+ "method": "POST",
+ "path": "/api/v3/landsat_process/LC80440342016259LGN00/TOAR/NDVI",
+ "request_url": "http:///actinia.mundialis.de/api/v3/landsat_process/LC80440342016259LGN00/TOAR/NDVI"
+ },
+ "datetime": "2018-05-30 11:22:58.315162",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "g",
+ "inputs": {
+ "map": "LC80440342016259LGN00_TOAR_NDVI"
+ },
+ "module": "r.univar",
+ "outputs": {
+ "output": {
+ "name": "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/tmpkiv0uv6z.univar"
+ }
+ }
+ }
+ },
+ {
+ "1": {
+ "flags": "n",
+ "inputs": {
+ "map": "LC80440342016259LGN00_TOAR_NDVI"
+ },
+ "module": "d.rast"
+ },
+ "2": {
+ "flags": "n",
+ "inputs": {
+ "at": "8,92,0,7",
+ "raster": "LC80440342016259LGN00_TOAR_NDVI"
+ },
+ "module": "d.legend"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B6.TIF",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_B6.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 23.63347291946411,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B6.TIF",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B6.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 0.05022144317626953,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B7.TIF",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_B7.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 22.89448094367981,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B7.TIF",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B7.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 0.051961421966552734,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B8.TIF",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_B8.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 83.04966020584106,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B8.TIF",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B8.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 0.05012321472167969,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B9.TIF",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_B9.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 11.948487043380737,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B9.TIF",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B9.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 0.05081939697265625,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B10.TIF",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_B10.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 15.688527345657349,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B10.TIF",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B10.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 0.05163097381591797,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B11.TIF",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_B11.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 15.100370645523071,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_B11.TIF",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B11.TIF"
+ ],
+ "return_code": 0,
+ "run_time": 0.05057358741760254,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "-O",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_MTL.txt",
+ "https://storage.googleapis.com/gcp-public-data-landsat/LC08/PRE/044/034/LC80440342016259LGN00/LC80440342016259LGN00_MTL.txt"
+ ],
+ "return_code": 0,
+ "run_time": 0.25395917892456055,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_MTL.txt",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_MTL.txt"
+ ],
+ "return_code": 0,
+ "run_time": 0.05015206336975098,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "python3",
+ "parameter": [
+ "/usr/local/bin/grass",
+ "-e",
+ "-c",
+ "/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B1.TIF",
+ "/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/Landsat"
+ ],
+ "return_code": 0,
+ "run_time": 0.15161657333374023,
+ "stderr": [
+ "Default locale settings are missing. GRASS running with C locale.WARNING: Searched for a web browser, but none found",
+ "Creating new GRASS GIS project/mapset...",
+ "Cleaning up temporary files...",
+ ""
+ ],
+ "stdout": "Default locale not found, using UTF-8\n"
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B1.TIF",
+ "output=LC80440342016259LGN00.1",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.093010902404785,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B2.TIF",
+ "output=LC80440342016259LGN00.2",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.020535707473755,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B3.TIF",
+ "output=LC80440342016259LGN00.3",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 2.9988090991973877,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B4.TIF",
+ "output=LC80440342016259LGN00.4",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.0504379272460938,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B5.TIF",
+ "output=LC80440342016259LGN00.5",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.0378293991088867,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B6.TIF",
+ "output=LC80440342016259LGN00.6",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.1231300830841064,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B7.TIF",
+ "output=LC80440342016259LGN00.7",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.0385892391204834,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B8.TIF",
+ "output=LC80440342016259LGN00.8",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 11.727607488632202,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B9.TIF",
+ "output=LC80440342016259LGN00.9",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.531238317489624,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B10.TIF",
+ "output=LC80440342016259LGN00.10",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.1895594596862793,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_B11.TIF",
+ "output=LC80440342016259LGN00.11",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 3.1583566665649414,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "i.landsat.toar",
+ "parameter": [
+ "input=LC80440342016259LGN00.",
+ "metfile=/actinia/workspace/download_cache/demouser/LC80440342016259LGN00_MTL.txt",
+ "method=uncorrected",
+ "output=LC80440342016259LGN00_TOAR.",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 101.34896063804626,
+ "stderr": [
+ "WARNING: ESUN evaluated from REFLECTANCE_MAXIMUM_BAND",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "i.vi",
+ "parameter": [
+ "red=LC80440342016259LGN00_TOAR.4",
+ "nir=LC80440342016259LGN00_TOAR.5",
+ "green=LC80440342016259LGN00_TOAR.3",
+ "blue=LC80440342016259LGN00_TOAR.2",
+ "band5=LC80440342016259LGN00_TOAR.7",
+ "band7=LC80440342016259LGN00_TOAR.8",
+ "viname=ndvi",
+ "output=LC80440342016259LGN00_TOAR_NDVI"
+ ],
+ "return_code": 0,
+ "run_time": 45.43833112716675,
+ "stderr": [
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.colors",
+ "parameter": [
+ "map=LC80440342016259LGN00_TOAR_NDVI",
+ "color=ndvi"
+ ],
+ "return_code": 0,
+ "run_time": 0.050219058990478516,
+ "stderr": [
+ "Color table for raster map <LC80440342016259LGN00_TOAR_NDVI> set to 'ndvi'",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.univar",
+ "parameter": [
+ "map=LC80440342016259LGN00_TOAR_NDVI",
+ "output=/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/tmpkiv0uv6z.univar",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 2.5560226440429688,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "d.rast",
+ "parameter": [
+ "map=LC80440342016259LGN00_TOAR_NDVI",
+ "-n"
+ ],
+ "return_code": 0,
+ "run_time": 1.2287390232086182,
+ "stderr": [
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "d.legend",
+ "parameter": [
+ "raster=LC80440342016259LGN00_TOAR_NDVI",
+ "at=8,92,0,7",
+ "-n"
+ ],
+ "return_code": 0,
+ "run_time": 0.37291598320007324,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.region",
+ "parameter": [
+ "raster=LC80440342016259LGN00_TOAR_NDVI",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.051508188247680664,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=1\nzone=10\nn=4264515\ns=4030185\nw=464385\ne=694515\nnsres=30\newres=30\nrows=7811\ncols=7671\ncells=59918181\n"
+ },
+ {
+ "executable": "r.out.gdal",
+ "parameter": [
+ "-fm",
+ "input=LC80440342016259LGN00_TOAR_NDVI",
+ "format=GTiff",
+ "createopt=COMPRESS=LZW",
+ "output=/actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_TOAR_NDVI.tiff"
+ ],
+ "return_code": 0,
+ "run_time": 8.784564018249512,
+ "stderr": [
+ "Checking GDAL data type and nodata value...",
+ "2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100",
+ "Using GDAL data type <Float64>",
+ "Input raster map contains cells with NULL-value (no-data). The value -nan will be used to represent no-data values in the input map. You can specify a nodata value with the nodata option.",
+ "Exporting raster data to GTiff format...",
+ "ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.",
+ "2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100",
+ "r.out.gdal complete. File </actinia/workspace/temp_db/gisdbase_4e879f3951334a559612abab4352b069/.tmp/LC80440342016259LGN00_TOAR_NDVI.tiff> created.",
+ ""
+ ],
+ "stdout": ""
+ }
+ ],
+ "process_results": [
+ {
+ "cells": 59918181.0,
+ "coeff_var": 125.4796560716,
+ "max": 1.31488464218245,
+ "mean": 0.215349514428788,
+ "mean_of_abs": 0.272685223860196,
+ "min": -1.35084534300324,
+ "n": 41612094.0,
+ "name": "LC80440342016259LGN00_TOAR_NDVI",
+ "null_cells": 18306087.0,
+ "range": 2.6657299851857,
+ "stddev": 0.270219830057103,
+ "sum": 8961144.23726506,
+ "variance": 0.0730187565560894
+ }
+ ],
+ "progress": {
+ "num_of_steps": 35,
+ "step": 34
+ },
+ "resource_id": "resource_id-6282c634-42e1-417c-a092-c9b21c3283cc",
+ "status": "finished",
+ "time_delta": 415.2818741798401,
+ "timestamp": 1527679378.31516,
+ "urls": {
+ "resources": [
+ "http://actinia.mundialis.de/api/v3/resource/demouser/resource_id-6282c634-42e1-417c-a092-c9b21c3283cc/tmp80apvh0h.png",
+ "http://actinia.mundialis.de/api/v3/resource/demouser/resource_id-6282c634-42e1-417c-a092-c9b21c3283cc/LC80440342016259LGN00_TOAR_NDVI.tiff"
+ ],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-6282c634-42e1-417c-a092-c9b21c3283cc"
+ },
+ "user_id": "demouser"
+ }
+
+The statistical analysis of the resulting NDVI raster map layer is +available in the process_results section:
+ {
+ "cells": 59918181.0,
+ "coeff_var": 125.4796560716,
+ "max": 1.31488464218245,
+ "mean": 0.215349514428788,
+ "mean_of_abs": 0.272685223860196,
+ "min": -1.35084534300324,
+ "n": 41612094.0,
+ "name": "LC80440342016259LGN00_TOAR_NDVI",
+ "null_cells": 18306087.0,
+ "range": 2.6657299851857,
+ "stddev": 0.270219830057103,
+ "sum": 8961144.23726506,
+ "variance": 0.0730187565560894
+ }
+
+The following links can be found in the urls section of the JSON +response that point to the created resources:
+ + +The preview image should look like this:
+ + +Actinia provides the process chain approach to specify import, +processing and export of geodata using the actinia GRASS GIS processing +system. The process chain must be formulated in JSON. The processing is +always performed in an ephemeral database. The computational environment +is based on projects in the persistent database. If required, the +ephemeral database can be moved into the persistent user database, so +that the computational results can be used in further processing steps +or visualized using the actinia rendering REST calls.
+The ephemeral database will be removed after computation. However, all +raster and vector data that was generated during the processing can be +exported using gdal/ogr specific datatypes and stored in an object +storage, outside the actinia environment. Within a process chain we have +read only access to all raster maps of the persistent database project +that is used as computational environment.
+A process chain is a list of GRASS GIS modules^1 that will be executed in +serial, based on the order of the list. GRASS GIS modules are specified +as process definitions^2 that include the name of the command, the +inputs and outputs], including import and export definitions as +well as the module flags.
+The following example defines a single process +that runs the GRASS GIS module r.slope.aspect^3 to compute the +slope for the raster map layer elev_ned_30m that is located in the +mapset^4 PERMANENT. The output of the module is named +elev_ned_30m_slope and should be exported as a GeoTiff file.
+ {
+ "module": "r.slope.aspect",
+ "id": "r_slope_aspect_1",
+ "inputs": [
+ {
+ "param": "elevation",
+ "value": "elev_ned_30m@PERMANENT"
+ }
+ ],
+ "outputs": [
+ {
+ "export": {
+ "format": "GTiff",
+ "type": "raster"
+ },
+ "param": "slope",
+ "value": "elev_ned_30m_slope"
+ }
+ ],
+ "flags": "a"
+ }
+
+Import and export
+The actinia process chain supports the specification of URL's to raster +layers in the input definition. The following process chain imports a +raster map layer that is located in an object storage with the name +elev_ned_30m_new and sets the computational region for the +following processing step with the GRASS GIS module g.region^5. Then +slope and aspect are computed with r.slope.aspect and specified for +export as GeoTiff files.
+ {
+ "list": [
+ {
+ "module": "g.region",
+ "id": "g_region_1",
+ "inputs": [
+ {
+ "import_descr": {
+ "source": "https://storage.googleapis.com/graas-geodata/elev_ned_30m.tif",
+ "type": "raster"
+ },
+ "param": "raster",
+ "value": "elev_ned_30m_new"
+ }
+ ],
+ "flags": "p"
+ },
+ {
+ "module": "r.slope.aspect",
+ "id": "r_slope_aspect_1",
+ "inputs": [
+ {
+ "param": "elevation",
+ "value": "elev_ned_30m_new"
+ }
+ ],
+ "outputs": [
+ {
+ "export": {
+ "format": "GTiff",
+ "type": "raster"
+ },
+ "param": "slope",
+ "value": "elev_ned_30m_new_slope"
+ }
+ ],
+ "flags": "a"
+ }
+ ],
+ "version": "1"
+ }
+
+Output parsing
+Many GRASS GIS modules produce textual output in form of lists, tables +and key/value pairs. Actinia supports the analysis of this data and the +parsing and transformation in JSON accessible data. For each GRASS GIS +module the property "stdout" can be specified to transform the output +of the module into a list of values, a key/value list or a table.
+The following options are available as format:
+Additionally the unique id that will be used in the response process +result dictionary and the delimiter must be defined.
+The following process chain demonstrates all available approaches, to +parse the stdout output of a module:
+ {
+ "version": 1,
+ "list": [
+ {
+ "id": "1",
+ "module": "g.region",
+ "inputs": [
+ {"param": "raster",
+ "value": "elevation@PERMANENT"},
+ {"param": "res",
+ "value": "5000"}
+ ],
+ "stdout": {"id": "region", "format": "kv", "delimiter": "="},
+ "flags": "g"
+ },
+ {
+ "id": "2",
+ "module": "r.out.ascii",
+ "inputs": [{"param": "input",
+ "value": "elevation@PERMANENT"},
+ {"param": "precision", "value": "0"}],
+ "stdout": {"id": "elevation", "format": "table", "delimiter": " "},
+ "flags": "h"
+ },
+ {
+ "id": "3",
+ "module": "g.list",
+ "inputs": [{"param": "type",
+ "value": "raster"}],
+ "stdout": {"id": "map_list", "format": "list", "delimiter": "\n"}
+ },
+ {
+ "id": "4",
+ "module": "r.univar",
+ "inputs": [{"param": "map",
+ "value": "elevation@PERMANENT"}],
+ "stdout": {"id": "stats", "format": "kv", "delimiter": "="},
+ "flags": "g"
+ },
+ {
+ "id": "5",
+ "module": "r.univar",
+ "inputs": [{"param": "map",
+ "value": "elevation@PERMANENT"},
+ {"param": "zones",
+ "value": "basin_50K@PERMANENT"},
+ {"param": "separator",
+ "value": "pipe"}],
+ "stdout": {"id": "stats_zonal", "format": "table", "delimiter": "|"},
+ "flags": "t"
+ }
+ ]
+ }
+
+The result of the process chain evaluation is the following JSON +response:
+ {
+ "accept_datetime": "2018-06-28 14:11:03.439431",
+ "accept_timestamp": 1530195063.439429,
+ "api_info": {
+ "endpoint": "asyncephemeralresource",
+ "method": "POST",
+ "path": "/api/v3/projects/nc_spm_08/processing_async",
+ "request_url": "http://localhost/api/v3/projects/nc_spm_08/processing_async"
+ },
+ "datetime": "2018-06-28 14:11:03.878996",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "list": [
+ {
+ "flags": "g",
+ "id": "1",
+ "inputs": [
+ {
+ "param": "raster",
+ "value": "elevation@PERMANENT"
+ },
+ {
+ "param": "res",
+ "value": "5000"
+ }
+ ],
+ "module": "g.region",
+ "stdout": {
+ "delimiter": "=",
+ "format": "kv",
+ "id": "region"
+ }
+ },
+ {
+ "flags": "h",
+ "id": "2",
+ "inputs": [
+ {
+ "param": "input",
+ "value": "elevation@PERMANENT"
+ },
+ {
+ "param": "precision",
+ "value": "0"
+ }
+ ],
+ "module": "r.out.ascii",
+ "stdout": {
+ "delimiter": " ",
+ "format": "table",
+ "id": "elevation"
+ }
+ },
+ {
+ "id": "3",
+ "inputs": [
+ {
+ "param": "type",
+ "value": "raster"
+ }
+ ],
+ "module": "g.list",
+ "stdout": {
+ "delimiter": "\n",
+ "format": "list",
+ "id": "map_list"
+ }
+ },
+ {
+ "flags": "g",
+ "id": "4",
+ "inputs": [
+ {
+ "param": "map",
+ "value": "elevation@PERMANENT"
+ }
+ ],
+ "module": "r.univar",
+ "stdout": {
+ "delimiter": "=",
+ "format": "kv",
+ "id": "stats"
+ }
+ },
+ {
+ "flags": "t",
+ "id": "5",
+ "inputs": [
+ {
+ "param": "map",
+ "value": "elevation@PERMANENT"
+ },
+ {
+ "param": "zones",
+ "value": "basin_50K@PERMANENT"
+ },
+ {
+ "param": "separator",
+ "value": "pipe"
+ }
+ ],
+ "module": "r.univar",
+ "stdout": {
+ "delimiter": "|",
+ "format": "table",
+ "id": "stats_zonal"
+ }
+ }
+ ],
+ "version": 1
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "g.region",
+ "parameter": [
+ "raster=elevation@PERMANENT",
+ "res=5000",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.050546884536743164,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=99\nzone=0\nn=228500\ns=215000\nw=630000\ne=645000\nnsres=4500\newres=5000\nrows=3\ncols=3\ncells=9\n"
+ },
+ {
+ "executable": "r.out.ascii",
+ "parameter": [
+ "input=elevation@PERMANENT",
+ "precision=0",
+ "-h"
+ ],
+ "return_code": 0,
+ "run_time": 0.05101513862609863,
+ "stderr": [
+ "0..33..66.."
+ ],
+ "stdout": "147 138 100 \n125 114 76 \n125 121 96 \n"
+ },
+ {
+ "executable": "g.list",
+ "parameter": [
+ "type=raster"
+ ],
+ "return_code": 0,
+ "run_time": 0.05074191093444824,
+ "stderr": [
+ ""
+ ],
+ "stdout": "aspect\nbasin_50K\nboundary_county_500m\ncfactorbare_1m\ncfactorgrow_1m\nel_D782_6m\nel_D783_6m\nel_D792_6m\nel_D793_6m\nelev_lid792_1m\nelev_ned_30m\nelev_srtm_30m\nelev_state_500m\nelevation\nelevation_shade\nfacility\ngeology_30m\nlakes\nlandclass96\nlandcover_1m\nlanduse96_28m\nlsat7_2002_10\nlsat7_2002_20\nlsat7_2002_30\nlsat7_2002_40\nlsat7_2002_50\nlsat7_2002_61\nlsat7_2002_62\nlsat7_2002_70\nlsat7_2002_80\nncmask_500m\northo_2001_t792_1m\nroadsmajor\nslope\nsoilsID\nsoils_Kfactor\nstreams_derived\ntowns\nurban\nzipcodes\nzipcodes_dbl\n"
+ },
+ {
+ "executable": "r.univar",
+ "parameter": [
+ "map=elevation@PERMANENT",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.05033302307128906,
+ "stderr": [
+ ""
+ ],
+ "stdout": "n=9\nnull_cells=0\ncells=9\nmin=75.9926223754883\nmax=147.101608276367\nrange=71.1089859008789\nmean=115.709356519911\nmean_of_abs=115.709356519911\nstddev=20.8179625939249\nvariance=433.387566562055\ncoeff_var=17.9915982769661\nsum=1041.3842086792\n"
+ },
+ {
+ "executable": "r.univar",
+ "parameter": [
+ "map=elevation@PERMANENT",
+ "zones=basin_50K@PERMANENT",
+ "separator=pipe",
+ "-t"
+ ],
+ "return_code": 0,
+ "run_time": 0.05089259147644043,
+ "stderr": [
+ "0..33..66..100",
+ ""
+ ],
+ "stdout": "zone|label|non_null_cells|null_cells|min|max|range|mean|mean_of_abs|stddev|variance|coeff_var|sum|sum_abs\n2||1|0|99.7889709472656|99.7889709472656|0|99.7889709472656|99.7889709472656|0|0|0|99.7889709472656|99.7889709472656\n8||1|0|137.68424987793|137.68424987793|0|137.68424987793|137.68424987793|0|0|0|137.68424987793|137.68424987793\n14||1|0|114.471084594727|114.471084594727|0|114.471084594727|114.471084594727|0|0|0|114.471084594727|114.471084594727\n16||1|0|75.9926223754883|75.9926223754883|0|75.9926223754883|75.9926223754883|0|0|0|75.9926223754883|75.9926223754883\n20||2|0|124.611175537109|125.171577453613|0.560401916503906|124.891376495361|124.891376495361|0.280200958251953|0.0785125770053128|0.224355729046161|249.782752990723|249.782752990723\n24||1|0|120.942115783691|120.942115783691|0|120.942115783691|120.942115783691|0|0|0|120.942115783691|120.942115783691\n"
+ }
+ ],
+ "process_results": {
+ "elevation": [
+ [
+ "147",
+ "138",
+ "100"
+ ],
+ [
+ "125",
+ "114",
+ "76"
+ ],
+ [
+ "125",
+ "121",
+ "96"
+ ]
+ ],
+ "map_list": [
+ "aspect",
+ "basin_50K",
+ "boundary_county_500m",
+ "cfactorbare_1m",
+ "cfactorgrow_1m",
+ "el_D782_6m",
+ "el_D783_6m",
+ "el_D792_6m",
+ "el_D793_6m",
+ "elev_lid792_1m",
+ "elev_ned_30m",
+ "elev_srtm_30m",
+ "elev_state_500m",
+ "elevation",
+ "elevation_shade",
+ "facility",
+ "geology_30m",
+ "lakes",
+ "landclass96",
+ "landcover_1m",
+ "landuse96_28m",
+ "lsat7_2002_10",
+ "lsat7_2002_20",
+ "lsat7_2002_30",
+ "lsat7_2002_40",
+ "lsat7_2002_50",
+ "lsat7_2002_61",
+ "lsat7_2002_62",
+ "lsat7_2002_70",
+ "lsat7_2002_80",
+ "ncmask_500m",
+ "ortho_2001_t792_1m",
+ "roadsmajor",
+ "slope",
+ "soilsID",
+ "soils_Kfactor",
+ "streams_derived",
+ "towns",
+ "urban",
+ "zipcodes",
+ "zipcodes_dbl"
+ ],
+ "region": {
+ "cells": "9",
+ "cols": "3",
+ "e": "645000",
+ "ewres": "5000",
+ "n": "228500",
+ "nsres": "4500",
+ "projection": "99",
+ "rows": "3",
+ "s": "215000",
+ "w": "630000",
+ "zone": "0"
+ },
+ "stats": {
+ "cells": "9",
+ "coeff_var": "17.9915982769661",
+ "max": "147.101608276367",
+ "mean": "115.709356519911",
+ "mean_of_abs": "115.709356519911",
+ "min": "75.9926223754883",
+ "n": "9",
+ "null_cells": "0",
+ "range": "71.1089859008789",
+ "stddev": "20.8179625939249",
+ "sum": "1041.3842086792",
+ "variance": "433.387566562055"
+ },
+ "stats_zonal": [
+ [
+ "zone",
+ "label",
+ "non_null_cells",
+ "null_cells",
+ "min",
+ "max",
+ "range",
+ "mean",
+ "mean_of_abs",
+ "stddev",
+ "variance",
+ "coeff_var",
+ "sum",
+ "sum_abs"
+ ],
+ [
+ "2",
+ "",
+ "1",
+ "0",
+ "99.7889709472656",
+ "99.7889709472656",
+ "0",
+ "99.7889709472656",
+ "99.7889709472656",
+ "0",
+ "0",
+ "0",
+ "99.7889709472656",
+ "99.7889709472656"
+ ],
+ [
+ "8",
+ "",
+ "1",
+ "0",
+ "137.68424987793",
+ "137.68424987793",
+ "0",
+ "137.68424987793",
+ "137.68424987793",
+ "0",
+ "0",
+ "0",
+ "137.68424987793",
+ "137.68424987793"
+ ],
+ [
+ "14",
+ "",
+ "1",
+ "0",
+ "114.471084594727",
+ "114.471084594727",
+ "0",
+ "114.471084594727",
+ "114.471084594727",
+ "0",
+ "0",
+ "0",
+ "114.471084594727",
+ "114.471084594727"
+ ],
+ [
+ "16",
+ "",
+ "1",
+ "0",
+ "75.9926223754883",
+ "75.9926223754883",
+ "0",
+ "75.9926223754883",
+ "75.9926223754883",
+ "0",
+ "0",
+ "0",
+ "75.9926223754883",
+ "75.9926223754883"
+ ],
+ [
+ "20",
+ "",
+ "2",
+ "0",
+ "124.611175537109",
+ "125.171577453613",
+ "0.560401916503906",
+ "124.891376495361",
+ "124.891376495361",
+ "0.280200958251953",
+ "0.0785125770053128",
+ "0.224355729046161",
+ "249.782752990723",
+ "249.782752990723"
+ ],
+ [
+ "24",
+ "",
+ "1",
+ "0",
+ "120.942115783691",
+ "120.942115783691",
+ "0",
+ "120.942115783691",
+ "120.942115783691",
+ "0",
+ "0",
+ "0",
+ "120.942115783691",
+ "120.942115783691"
+ ]
+ ]
+ },
+ "progress": {
+ "num_of_steps": 5,
+ "step": 5
+ },
+ "resource_id": "resource_id-f084adb6-53eb-42eb-abd1-ae2799a53561",
+ "status": "finished",
+ "time_delta": 0.4396040439605713,
+ "timestamp": 1530195063.878975,
+ "urls": {
+ "resources": [],
+ "status": "http://localhost/api/v3/resources/admin/resource_id-f084adb6-53eb-42eb-abd1-ae2799a53561"
+ },
+ "user_id": "admin"
+ }
+
+The result of the stdout output parsing for each module is located in +the "process_results" section of the json response.
+We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different +address:
+export ACTINIA_URL=https://actinia.mundialis.de/latest
+export AUTH='-u demouser:gu3st!pa55w0rd'
+# other user credentials can be provided in the same way
+
+We create a process chain that computes the NDVI from a Sentinel-2A +scene based on the bands 8 and 4 with the GRASS GIS module r.mapcalc. We +use the North Carolina sample project nc_spm_08 as processing +environment and the computational region of sentinel band B04 for the +NDVI processing. Then we calculate univariate statistics for the +Sentinel-2A scene. The computed NDVI raster layer will be exported as +geotiff file that can be accessed via an URL.
+The following JSON code has 6 process definitions:
+ {
+ "list": [{"id": "importer_1",
+ "module": "importer",
+ "inputs": [{"import_descr": {"source": "S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "type": "sentinel2",
+ "sentinel_band": "B04"},
+ "param": "map",
+ "value": "B04"},
+ {"import_descr": {"source": "S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "type": "sentinel2",
+ "sentinel_band": "B08"},
+ "param": "map",
+ "value": "B08"}]},
+ {"id": "g_region_1",
+ "module": "g.region",
+ "inputs": [{"param": "raster",
+ "value": "B04"}],
+ "flags": "g"},
+ {"id": "rmapcalc_1",
+ "module": "r.mapcalc",
+ "inputs": [{"param": "expression",
+ "value": "NDVI = float(B08 - B04)/(B08 + B04)"}]},
+ {"id": "r_univar_sentinel2",
+ "module": "r.univar",
+ "inputs": [{"param": "map",
+ "value": "NDVI"}],
+ "flags": "g"},
+ {"id": "exporter_1",
+ "module": "exporter",
+ "outputs": [{"export": {"type": "raster", "format": "GTiff"},
+ "param": "map",
+ "value": "NDVI"}]}
+ ],
+ "version": "1"
+ }
+
+Run the process chain asynchronously:
+ JSON='{
+ "list": [{"id": "importer_1",
+ "module": "importer",
+ "inputs": [{"import_descr": {"source": "S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "type": "sentinel2",
+ "sentinel_band": "B04"},
+ "param": "map",
+ "value": "B04"},
+ {"import_descr": {"source": "S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "type": "sentinel2",
+ "sentinel_band": "B08"},
+ "param": "map",
+ "value": "B08"}]},
+ {"id": "g_region_1",
+ "module": "g.region",
+ "inputs": [{"param": "raster",
+ "value": "B04"}],
+ "flags": "g"},
+ {"id": "rmapcalc_1",
+ "module": "r.mapcalc",
+ "inputs": [{"param": "expression",
+ "value": "NDVI = float(B08 - B04)/(B08 + B04)"}]},
+ {"id": "r_univar_sentinel2",
+ "module": "r.univar",
+ "inputs": [{"param": "map",
+ "value": "NDVI"}],
+ "flags": "g"},
+ {"id": "exporter_1",
+ "module": "exporter",
+ "outputs": [{"export": {"type": "raster", "format": "GTiff"},
+ "param": "map",
+ "value": "NDVI"}]}
+ ],
+ "version": "1"}'
+
+curl ${AUTH} -X POST "${ACTINIA_URL}/projects/nc_spm_08/processing_async_export" -H "accept: application/json" -H "content-type: application/json" -d "$JSON"
+
+The response requires the polling of the status URL, since the API call +works asynchronously:
+{
+ "accept_datetime": "2022-07-28 14:07:21.578233",
+ "accept_timestamp": 1659017241.5782313,
+ "api_info": {
+ "endpoint": "asyncephemeralexportresource",
+ "method": "POST",
+ "path": "/api/v3/projects/nc_spm_08/processing_async_export",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/nc_spm_08/processing_async_export"
+ },
+ "datetime": "2022-07-28 14:07:21.580321",
+ "http_code": 200,
+ "message": "Resource accepted",
+ "process_chain_list": [],
+ "process_results": {},
+ "resource_id": "resource_id-b7b3bfb6-5887-4bc7-b80d-54c0424bfd70",
+ "status": "accepted",
+ "time_delta": 0.002097606658935547,
+ "timestamp": 1659017241.58032,
+ "urls": {
+ "resources": [],
+ "status": "https://actinia.mundialis.de/api/v3/resources/demouser/resource_id-b7b3bfb6-5887-4bc7-b80d-54c0424bfd70"
+ },
+ "user_id": "demouser"
+}
+
+
+Poll the status of the Sentinel-2A NDVI job and view the result of the +computation (remember to use your own resource-id):
+ curl ${AUTH} -X GET "${ACTINIA_URL}/resources/demouser/resource_id-b7b3bfb6-5887-4bc7-b80d-54c0424bfd70"
+
+The finished response should look like this:
+{
+ "accept_datetime": "2022-07-28 14:07:21.578233",
+ "accept_timestamp": 1659017241.5782313,
+ "api_info": {
+ "endpoint": "asyncephemeralexportresource",
+ "method": "POST",
+ "path": "/api/v3/projects/nc_spm_08/processing_async_export",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/nc_spm_08/processing_async_export"
+ },
+ "datetime": "2022-07-28 14:14:42.004376",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "list": [
+ {
+ "id": "importer_1",
+ "inputs": [
+ {
+ "import_descr": {
+ "sentinel_band": "B04",
+ "source": "S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "type": "sentinel2"
+ },
+ "param": "map",
+ "value": "B04"
+ },
+ {
+ "import_descr": {
+ "sentinel_band": "B08",
+ "source": "S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "type": "sentinel2"
+ },
+ "param": "map",
+ "value": "B08"
+ }
+ ],
+ "module": "importer"
+ },
+ {
+ "flags": "g",
+ "id": "g_region_1",
+ "inputs": [
+ {
+ "param": "raster",
+ "value": "B04"
+ }
+ ],
+ "module": "g.region"
+ },
+ {
+ "id": "rmapcalc_1",
+ "inputs": [
+ {
+ "param": "expression",
+ "value": "NDVI = float((B08 - B04))/(B08 + B04)"
+ }
+ ],
+ "module": "r.mapcalc"
+ },
+ {
+ "flags": "g",
+ "id": "r_univar_sentinel2",
+ "inputs": [
+ {
+ "param": "map",
+ "value": "NDVI"
+ }
+ ],
+ "module": "r.univar"
+ },
+ {
+ "id": "exporter_1",
+ "module": "exporter",
+ "outputs": [
+ {
+ "export": {
+ "format": "GTiff",
+ "type": "raster"
+ },
+ "param": "map",
+ "value": "NDVI"
+ }
+ ]
+ }
+ ],
+ "version": "1"
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "i.sentinel.download",
+ "id": "i_sentinel_download_S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "mapset_size": 421,
+ "parameter": [
+ "datasource=GCS",
+ "query=identifier=S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "output=/actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/temp_file_1"
+ ],
+ "return_code": 0,
+ "run_time": 36.222164154052734,
+ "stderr": [
+ "Downloading data into </actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/temp_file_1>...",
+ "Downloading S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632...",
+ "\r 0%| | 0/84 [00:00<?, ?it/s]\r 2%|▏ | 2/84 [00:00<00:09, 8.82it/s]\r 4%|▎ ...",
+ "Downloaded to /actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/temp_file_1/S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632.SAFE",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "i.sentinel.import",
+ "id": "i_sentinel_import_S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632",
+ "mapset_size": 376982877,
+ "parameter": [
+ "input=/actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/temp_file_1",
+ "pattern=(B04_10m|B08_10m)",
+ "-r"
+ ],
+ "return_code": 0,
+ "run_time": 344.0564560890198,
+ "stderr": [
+ "Processing <T18SUE_20220420T154941_B08_10m>...",
+ "Importing raster map <T18SUE_20220420T154941_B08_10m>...",
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ "Estimated target resolution for input band <T18SUE_20220420T154941_B08_10m>: 9.618686330457596",
+ "Using given resolution for input band <T18SUE_20220420T154941_B08_10m>: 10.0",
+ "Reprojecting <T18SUE_20220420T154941_B08_10m>...",
+ "Rounding to integer after reprojection",
+ "Processing <T18SUE_20220420T154941_B04_10m>...",
+ "Importing raster map <T18SUE_20220420T154941_B04_10m>...",
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ "Estimated target resolution for input band <T18SUE_20220420T154941_B04_10m>: 9.618686330457596",
+ "Using given resolution for input band <T18SUE_20220420T154941_B04_10m>: 10.0",
+ "Reprojecting <T18SUE_20220420T154941_B04_10m>...",
+ "Rounding to integer after reprojection",
+ "Writing metadata to maps...",
+ "/usr/local/grass/scripts/i.sentinel.import:830: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.",
+ "Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations",
+ " dtype=np.float,",
+ "/usr/local/grass/scripts/i.sentinel.import:834: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.",
+ "Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations",
+ " dtype=np.float,",
+ "/usr/local/grass/scripts/i.sentinel.import:846: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.",
+ "Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations",
+ " dtype=np.float,",
+ "/usr/local/grass/scripts/i.sentinel.import:850: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.",
+ "Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations",
+ " dtype=np.float,",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.rename",
+ "id": "rename_S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632_B04",
+ "mapset_size": 376982877,
+ "parameter": [
+ "raster=T18SUE_20220420T154941_B04_10m,B04"
+ ],
+ "return_code": 0,
+ "run_time": 0.15042471885681152,
+ "stderr": [
+ "Rename raster <T18SUE_20220420T154941_B04_10m> to <B04>",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.rename",
+ "id": "rename_S2A_MSIL2A_20220420T154941_N0400_R054_T18SUE_20220421T000632_B08",
+ "mapset_size": 376982877,
+ "parameter": [
+ "raster=T18SUE_20220420T154941_B08_10m,B08"
+ ],
+ "return_code": 0,
+ "run_time": 0.15053868293762207,
+ "stderr": [
+ "Rename raster <T18SUE_20220420T154941_B08_10m> to <B08>",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.region",
+ "id": "g_region_1",
+ "mapset_size": 376982871,
+ "parameter": [
+ "raster=B04",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.10027408599853516,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=99\nzone=0\nn=269280\ns=155130\nw=769610\ne=883770\nnsres=10\newres=10\nrows=11415\ncols=11416\ncells=130313640\n"
+ },
+ {
+ "executable": "r.mapcalc",
+ "id": "rmapcalc_1",
+ "mapset_size": 808176157,
+ "parameter": [
+ "expression=NDVI = float((B08 - B04))/(B08 + B04)"
+ ],
+ "return_code": 0,
+ "run_time": 25.457623958587646,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.univar",
+ "id": "r_univar_sentinel2",
+ "mapset_size": 808176157,
+ "parameter": [
+ "map=NDVI",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 5.166007995605469,
+ "stderr": [
+ ""
+ ],
+ "stdout": "n=120547065\nnull_cells=9766575\ncells=130313640\nmin=-0.468370884656906\nmax=0.720661163330078\nrange=1.18903204798698\nmean=0.25310113195823\nmean_of_abs=0.283006503246459\nstddev=0.219731453415328\nvariance=0.0482819116200123\ncoeff_var=86.8156739226241\nsum=30510598.6057423\n"
+ },
+ {
+ "executable": "r.out.gdal",
+ "id": "exporter_raster_NDVI",
+ "mapset_size": 808176157,
+ "parameter": [
+ "-fmt",
+ "input=NDVI",
+ "format=GTiff",
+ "output=/actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/NDVI.tif",
+ "overviews=5",
+ "createopt=BIGTIFF=YES,COMPRESS=LZW,TILED=YES"
+ ],
+ "return_code": 0,
+ "run_time": 20.729568481445312,
+ "stderr": [
+ "Checking GDAL data type and nodata value...",
+ "2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100",
+ "Using GDAL data type <Float32>",
+ "Input raster map contains cells with NULL-value (no-data). The value -nan will be used to represent no-data values in the input map. You can specify a nodata value with the nodata option.",
+ "Exporting raster data to GTiff format...",
+ "ERROR 6: /actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/NDVI.tif, band 1: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.",
+ "2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100",
+ "Building overviews ...",
+ "r.out.gdal complete. File </actinia_core/workspace/temp_db/gisdbase_dbbd7bc372e942d0953fa0f7d019cacb/.tmp/NDVI.tif> created.",
+ ""
+ ],
+ "stdout": ""
+ }
+ ],
+ "process_results": {},
+ "progress": {
+ "num_of_steps": 8,
+ "step": 8
+ },
+ "resource_id": "resource_id-b7b3bfb6-5887-4bc7-b80d-54c0424bfd70",
+ "status": "finished",
+ "time_delta": 440.42616844177246,
+ "timestamp": 1659017682.0043712,
+ "urls": {
+ "resources": [
+ "https://actinia.mundialis.de/api/v3/resources/demouser/resource_id-b7b3bfb6-5887-4bc7-b80d-54c0424bfd70/NDVI.tif"
+ ],
+ "status": "https://actinia.mundialis.de/api/v3/resources/demouser/resource_id-b7b3bfb6-5887-4bc7-b80d-54c0424bfd70"
+ },
+ "user_id": "demouser"
+}
+
+Use the Link at the end of the response under "resources"
to download the final NDVI map to your local computer. You can load it into a GIS of your choice, it should look like this:
Footnotes
+ + +We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different +address:
+export ACTINIA_URL=https://actinia.mundialis.de/latest
+export AUTH='-u demouser:gu3st!pa55w0rd'
+# other user credentials can be provided in the same way
+
+The following asynchronous API call computes the NDVI of the Sentinel-2 +scene +S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749:
+ curl ${AUTH} -X POST "${ACTINIA_URL}/sentinel2_process/ndvi/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749"
+
+The response provides the status URL that must be polled to receive the +finished response:
+ {
+ "accept_datetime": "2018-05-30 12:25:43.987713",
+ "accept_timestamp": 1527683143.9877105,
+ "api_info": {
+ "endpoint": "asyncephemeralsentinel2processingresource",
+ "method": "POST",
+ "path": "/api/v3/sentinel2_process/ndvi/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749",
+ "request_url": "http://actinia.mundialis.de/api/v3/sentinel2_process/ndvi/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749"
+ },
+ "datetime": "2018-05-30 12:25:43.989044",
+ "http_code": 200,
+ "message": "Resource accepted",
+ "process_chain_list": [],
+ "process_results": {},
+ "resource_id": "resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce",
+ "status": "accepted",
+ "time_delta": 0.001340627670288086,
+ "timestamp": 1527683143.989044,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce"
+ },
+ "user_id": "demouser"
+ }
+
+Poll the status of the asynchronous API call by polling the status URL. +Be aware that you have to change the status url as the resource id will change for different NDVI API calls.
+ curl ${AUTH} -X GET http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce
+
+The final result will contain a complete processing list as well as +URL's to the resulting PNG preview image, the created NDVI GeoTiff file +as well as univariate statistics of the computed NDVI scene.
+ {
+ "accept_datetime": "2018-05-30 12:25:43.987713",
+ "accept_timestamp": 1527683143.9877105,
+ "api_info": {
+ "endpoint": "asyncephemeralsentinel2processingresource",
+ "method": "POST",
+ "path": "/api/v3/sentinel2_process/ndvi/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749",
+ "request_url": "http://actinia.mundialis.de/api/v3/sentinel2_process/ndvi/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749"
+ },
+ "datetime": "2018-05-30 12:29:11.800608",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "flags": "g",
+ "inputs": {
+ "map": "ndvi"
+ },
+ "module": "r.univar",
+ "outputs": {
+ "output": {
+ "name": "/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/tmp7il3n0jk.univar"
+ }
+ }
+ }
+ },
+ {
+ "1": {
+ "inputs": {
+ "map": "ndvi"
+ },
+ "module": "d.rast"
+ },
+ "2": {
+ "flags": "n",
+ "inputs": {
+ "at": "8,92,0,7",
+ "raster": "ndvi"
+ },
+ "module": "d.legend"
+ },
+ "3": {
+ "inputs": {
+ "at": "20,4",
+ "style": "line"
+ },
+ "module": "d.barscale"
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "https://storage.googleapis.com/gcp-public-data-sentinel-2/tiles/50/R/KR/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749.SAFE/GRANULE/L1C_T50RKR_A007608_20161206T030749/IMG_DATA/T50RKR_20161206T030112_B08.jp2"
+ ],
+ "return_code": 0,
+ "run_time": 49.85953092575073,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/wget",
+ "parameter": [
+ "-t5",
+ "-c",
+ "-q",
+ "https://storage.googleapis.com/gcp-public-data-sentinel-2/tiles/50/R/KR/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749.SAFE/GRANULE/L1C_T50RKR_A007608_20161206T030749/IMG_DATA/T50RKR_20161206T030112_B04.jp2"
+ ],
+ "return_code": 0,
+ "run_time": 38.676433801651,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749.gml",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749.gml"
+ ],
+ "return_code": 0,
+ "run_time": 0.05118393898010254,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/T50RKR_20161206T030112_B08.jp2",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08"
+ ],
+ "return_code": 0,
+ "run_time": 0.35857558250427246,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/bin/mv",
+ "parameter": [
+ "/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/T50RKR_20161206T030112_B04.jp2",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04"
+ ],
+ "return_code": 0,
+ "run_time": 0.15271401405334473,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "python3",
+ "parameter": [
+ "/usr/local/bin/grass",
+ "-e",
+ "-c",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08",
+ "/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/sentinel2"
+ ],
+ "return_code": 0,
+ "run_time": 0.36118006706237793,
+ "stderr": [
+ "Default locale settings are missing. GRASS running with C locale.WARNING: Searched for a web browser, but none found",
+ "Creating new GRASS GIS project/mapset...",
+ "Cleaning up temporary files...",
+ ""
+ ],
+ "stdout": "Default locale not found, using UTF-8\n"
+ },
+ {
+ "executable": "v.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749.gml",
+ "output=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 0.3551313877105713,
+ "stderr": [
+ "WARNING: Projection of dataset does not appear to match current project.",
+ "",
+ "Project PROJ_INFO is:",
+ "name: WGS 84 / UTM zone 50N",
+ "datum: wgs84",
+ "ellps: wgs84",
+ "proj: utm",
+ "zone: 50",
+ "no_defs: defined",
+ "",
+ "Dataset PROJ_INFO is:",
+ "name: WGS 84",
+ "datum: wgs84",
+ "ellps: wgs84",
+ "proj: ll",
+ "no_defs: defined",
+ "",
+ "ERROR: proj",
+ "",
+ "WARNING: Width for column fid set to 255 (was not specified by OGR), some strings may be truncated!",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "v.timestamp",
+ "parameter": [
+ "map=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749",
+ "date=06 dec 2016 03:07:49"
+ ],
+ "return_code": 0,
+ "run_time": 0.050455570220947266,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/gdal_translate",
+ "parameter": [
+ "-projwin",
+ "113.949663",
+ "28.011816",
+ "115.082607",
+ "27.001706",
+ "-of",
+ "vrt",
+ "-projwin_srs",
+ "EPSG:4326",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08.vrt"
+ ],
+ "return_code": 0,
+ "run_time": 0.05114293098449707,
+ "stderr": [
+ "Warning 1: Computed -srcwin 5 -225 10971 11419 falls partially outside raster extent. Going on however.",
+ ""
+ ],
+ "stdout": "Input file size is 10980, 10980\n"
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08.vrt",
+ "output=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08_uncropped",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 16.326167583465576,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.region",
+ "parameter": [
+ "align=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08_uncropped",
+ "vector=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.10460591316223145,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=1\nzone=50\nn=3100030\ns=2990100\nw=199960\ne=309790\nnsres=10\newres=10\nrows=10993\ncols=10983\ncells=120736119\n"
+ },
+ {
+ "executable": "r.mask",
+ "parameter": [
+ "vector=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749"
+ ],
+ "return_code": 0,
+ "run_time": 7.36047887802124,
+ "stderr": [
+ "Reading areas...",
+ "0..100",
+ "Writing raster map...",
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ "Reading areas...",
+ "0..100",
+ "Writing raster map...",
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ "All subsequent raster operations will be limited to the MASK area. Removing or renaming raster map named 'MASK' will restore raster operations to normal.",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.mapcalc",
+ "parameter": [
+ "expression=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08 = float(S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08_uncropped)"
+ ],
+ "return_code": 0,
+ "run_time": 10.695591926574707,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.timestamp",
+ "parameter": [
+ "map=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08",
+ "date=06 dec 2016 03:07:49"
+ ],
+ "return_code": 0,
+ "run_time": 0.053069353103637695,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.remove",
+ "parameter": [
+ "type=raster",
+ "name=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08_uncropped",
+ "-f"
+ ],
+ "return_code": 0,
+ "run_time": 0.050362348556518555,
+ "stderr": [
+ "Removing raster <S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08_uncropped>",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.mask",
+ "parameter": [
+ "-r"
+ ],
+ "return_code": 0,
+ "run_time": 0.10059237480163574,
+ "stderr": [
+ "Raster MASK removed",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "/usr/bin/gdal_translate",
+ "parameter": [
+ "-projwin",
+ "113.949663",
+ "28.011816",
+ "115.082607",
+ "27.001706",
+ "-of",
+ "vrt",
+ "-projwin_srs",
+ "EPSG:4326",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04",
+ "/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04.vrt"
+ ],
+ "return_code": 0,
+ "run_time": 0.05096769332885742,
+ "stderr": [
+ "Warning 1: Computed -srcwin 5 -225 10971 11419 falls partially outside raster extent. Going on however.",
+ ""
+ ],
+ "stdout": "Input file size is 10980, 10980\n"
+ },
+ {
+ "executable": "r.import",
+ "parameter": [
+ "input=/actinia/workspace/download_cache/demouser/S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04.vrt",
+ "output=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04_uncropped",
+ "--q"
+ ],
+ "return_code": 0,
+ "run_time": 16.76022958755493,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.region",
+ "parameter": [
+ "align=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04_uncropped",
+ "vector=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.0505826473236084,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=1\nzone=50\nn=3100030\ns=2990100\nw=199960\ne=309790\nnsres=10\newres=10\nrows=10993\ncols=10983\ncells=120736119\n"
+ },
+ {
+ "executable": "r.mask",
+ "parameter": [
+ "vector=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749"
+ ],
+ "return_code": 0,
+ "run_time": 6.779608249664307,
+ "stderr": [
+ "Reading areas...",
+ "0..100",
+ "Writing raster map...",
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ "Reading areas...",
+ "0..100",
+ "Writing raster map...",
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ "All subsequent raster operations will be limited to the MASK area. Removing or renaming raster map named 'MASK' will restore raster operations to normal.",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.mapcalc",
+ "parameter": [
+ "expression=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04 = float(S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04_uncropped)"
+ ],
+ "return_code": 0,
+ "run_time": 10.141529321670532,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.timestamp",
+ "parameter": [
+ "map=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04",
+ "date=06 dec 2016 03:07:49"
+ ],
+ "return_code": 0,
+ "run_time": 0.05050253868103027,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.remove",
+ "parameter": [
+ "type=raster",
+ "name=S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04_uncropped",
+ "-f"
+ ],
+ "return_code": 0,
+ "run_time": 0.05098080635070801,
+ "stderr": [
+ "Removing raster <S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04_uncropped>",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.mask",
+ "parameter": [
+ "-r"
+ ],
+ "return_code": 0,
+ "run_time": 0.10424232482910156,
+ "stderr": [
+ "Raster MASK removed",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.mapcalc",
+ "parameter": [
+ "expression=ndvi = (float(S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08) - float(S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04))/(float(S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B08) + float(S2A_MSIL1C_20161206T030112_N0204_R032_T50RKR_20161206T030749_B04))"
+ ],
+ "return_code": 0,
+ "run_time": 20.28681755065918,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.colors",
+ "parameter": [
+ "color=ndvi",
+ "map=ndvi"
+ ],
+ "return_code": 0,
+ "run_time": 0.05031251907348633,
+ "stderr": [
+ "Color table for raster map <ndvi> set to 'ndvi'",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "r.univar",
+ "parameter": [
+ "map=ndvi",
+ "output=/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/tmp7il3n0jk.univar",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 4.54892897605896,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "d.rast",
+ "parameter": [
+ "map=ndvi"
+ ],
+ "return_code": 0,
+ "run_time": 2.0198700428009033,
+ "stderr": [
+ "0..3..6..9..12..15..18..21..24..27..30..33..36..39..42..45..48..51..54..57..60..63..66..69..72..75..78..81..84..87..90..93..96..99..100",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "d.legend",
+ "parameter": [
+ "raster=ndvi",
+ "at=8,92,0,7",
+ "-n"
+ ],
+ "return_code": 0,
+ "run_time": 0.4614551067352295,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "d.barscale",
+ "parameter": [
+ "style=line",
+ "at=20,4"
+ ],
+ "return_code": 0,
+ "run_time": 0.416748046875,
+ "stderr": [
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "g.region",
+ "parameter": [
+ "raster=ndvi",
+ "-g"
+ ],
+ "return_code": 0,
+ "run_time": 0.051720619201660156,
+ "stderr": [
+ ""
+ ],
+ "stdout": "projection=1\nzone=50\nn=3100030\ns=2990100\nw=199960\ne=309790\nnsres=10\newres=10\nrows=10993\ncols=10983\ncells=120736119\n"
+ },
+ {
+ "executable": "r.out.gdal",
+ "parameter": [
+ "-fm",
+ "input=ndvi",
+ "format=GTiff",
+ "createopt=COMPRESS=LZW",
+ "output=/actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/ndvi.tiff"
+ ],
+ "return_code": 0,
+ "run_time": 12.550397157669067,
+ "stderr": [
+ "Checking GDAL data type and nodata value...",
+ "2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100",
+ "Using GDAL data type <Float32>",
+ "Input raster map contains cells with NULL-value (no-data). The value -nan will be used to represent no-data values in the input map. You can specify a nodata value with the nodata option.",
+ "Exporting raster data to GTiff format...",
+ "ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.",
+ "2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100",
+ "r.out.gdal complete. File </actinia/workspace/temp_db/gisdbase_103a050c380e4f50b36efd3f77bd1419/.tmp/ndvi.tiff> created.",
+ ""
+ ],
+ "stdout": ""
+ }
+ ],
+ "process_results": [
+ {
+ "cells": 120736119.0,
+ "coeff_var": 39.2111992829072,
+ "max": 0.80298912525177,
+ "mean": 0.345280366103636,
+ "mean_of_abs": 0.347984182813063,
+ "min": -0.96863466501236,
+ "n": 120371030.0,
+ "name": "ndvi",
+ "null_cells": 365089.0,
+ "range": 1.77162379026413,
+ "stddev": 0.135388572437648,
+ "sum": 41561753.3066718,
+ "variance": 0.0183300655467043
+ }
+ ],
+ "progress": {
+ "num_of_steps": 33,
+ "step": 32
+ },
+ "resource_id": "resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce",
+ "status": "finished",
+ "time_delta": 207.813636302948,
+ "timestamp": 1527683351.8002071,
+ "urls": {
+ "resources": [
+ "http://actinia.mundialis.de/api/v3/resource/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce/tmpsaeegg0q.png",
+ "http://actinia.mundialis.de/api/v3/resource/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce/ndvi.tiff"
+ ],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce"
+ },
+ "user_id": "demouser"
+ }
+
+The following URLs point to the resulting PNG preview image and the +NDVI GeoTiff file:
+http://actinia.mundialis.de/api/v3/resource/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce/tmpsaeegg0q.png +http://actinia.mundialis.de/api/v3/resource/demouser/resource_id-6b849585-576f-40b5-a514-34a7cf1f97ce/ndvi.tiff
+The PNG preview should look like this:
+ + +The actinia REST API provides an API call to sample a space-time raster +dataset (STRDS) at coordinate points. The coordinates must be specified +in JSON and must use the same coordinate reference system as the +project that contains the STRDS.
+We will use the Unix shell and curl to access the REST API. First open a shell of choice (we use bash here) and setup the login information, the IP address and the port on which the actinia service is running, so you can simply change the IP and port if your server uses a different +address:
+export ACTINIA_URL=https://actinia.mundialis.de/latest
+export AUTH='-u demouser:gu3st!pa55w0rd'
+# other user credentials can be provided in the same way
+
+The following example shows the synchronous API call that samples the +STRDS temperature_mean_1950_2013_yearly_celsius at three +different coordinates.
+ JSON='{"points":[["a", "-5.095406", "38.840583"],
+ ["b", "9.9681980", "51.666166"],
+ ["c", "24.859647", "52.699099"]]}'
+
+ curl ${AUTH} -X POST "${ACTINIA_URL}/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius/sampling_sync" -H "accept: application/json" -H "content-type: application/json" -d "$JSON"
+
+The result of the sampling is a list of time stamped values, that are +located in the process_results section of the JSON response:
+ {
+ "accept_datetime": "2018-05-30 10:33:23.640702",
+ "accept_timestamp": 1527676403.6407006,
+ "api_info": {
+ "endpoint": "syncephemeralstrdssamplingresource",
+ "method": "POST",
+ "path": "/api/v3/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius/sampling_sync",
+ "request_url": "http://actinia.mundialis.de/api/v3/projects/ECAD/mapsets/PERMANENT/strds/temperature_mean_1950_2013_yearly_celsius/sampling_sync"
+ },
+ "datetime": "2018-05-30 10:33:24.503297",
+ "http_code": 200,
+ "message": "Processing successfully finished",
+ "process_chain_list": [
+ {
+ "1": {
+ "inputs": {
+ "column": "id text, x double precision, y double precision",
+ "format": "point",
+ "input": "/actinia/workspace/temp_db/gisdbase_1977514d0cc1415bac3a1722aa4f6e1e/.tmp/tmprpjtds__",
+ "x": 2,
+ "y": 3
+ },
+ "module": "v.in.ascii",
+ "outputs": {
+ "output": {
+ "name": "input_points"
+ }
+ }
+ },
+ "2": {
+ "flags": "rn",
+ "inputs": {
+ "column": "id",
+ "points": "input_points",
+ "strds": "temperature_mean_1950_2013_yearly_celsius@PERMANENT"
+ },
+ "module": "t.rast.sample",
+ "outputs": {
+ "output": {
+ "name": "/actinia/workspace/temp_db/gisdbase_1977514d0cc1415bac3a1722aa4f6e1e/.tmp/tmpfsiu1fn1"
+ }
+ },
+ "overwrite": true,
+ "verbose": true
+ }
+ }
+ ],
+ "process_log": [
+ {
+ "executable": "v.in.ascii",
+ "parameter": [
+ "input=/actinia/workspace/temp_db/gisdbase_1977514d0cc1415bac3a1722aa4f6e1e/.tmp/tmprpjtds__",
+ "format=point",
+ "column=id text, x double precision, y double precision",
+ "x=2",
+ "y=3",
+ "output=input_points"
+ ],
+ "return_code": 0,
+ "run_time": 0.051050662994384766,
+ "stderr": [
+ "Scanning input for column types...",
+ "Number of columns: 3",
+ "Number of rows: 3",
+ "Importing points...",
+ "0..33..66..100",
+ "Populating table...",
+ "Building topology for vector map <input_points@mapset_1977514d0cc1415bac3a1722aa4f6e1e>...",
+ "Registering primitives...",
+ "",
+ ""
+ ],
+ "stdout": ""
+ },
+ {
+ "executable": "t.rast.sample",
+ "parameter": [
+ "strds=temperature_mean_1950_2013_yearly_celsius@PERMANENT",
+ "points=input_points",
+ "column=id",
+ "output=/actinia/workspace/temp_db/gisdbase_1977514d0cc1415bac3a1722aa4f6e1e/.tmp/tmpfsiu1fn1",
+ "-rn",
+ "--o",
+ "--v"
+ ],
+ "return_code": 0,
+ "run_time": 0.7098870277404785,
+ "stderr": ["..."],
+ "stdout": ""
+ }
+ ],
+ "process_results": [
+ [
+ "start_time",
+ "end_time",
+ "a",
+ "b",
+ "c"
+ ],
+ [
+ "1950-01-01 00:00:00",
+ "1951-01-01 00:00:00",
+ "16.41218887608807",
+ "8.178182155657963",
+ "7.176576932923706"
+ ],
+ [
+ "..."
+ ],
+ [
+ "2012-01-01 00:00:00",
+ "2013-01-01 00:00:00",
+ "16.55121792732666",
+ "8.837787912495367",
+ "7.872688635520949"
+ ]
+ ],
+ "progress": {
+ "num_of_steps": 2,
+ "step": 2
+ },
+ "resource_id": "resource_id-ff89db3c-1cae-44e1-adb5-35ce1ab994bc",
+ "status": "finished",
+ "time_delta": 0.8626308441162109,
+ "timestamp": 1527676404.5032735,
+ "urls": {
+ "resources": [],
+ "status": "http://actinia.mundialis.de/api/v3/resources/demouser/resource_id-ff89db3c-1cae-44e1-adb5-35ce1ab994bc"
+ },
+ "user_id": "demouser"
+ }
+
+
+