Skip to content

Conversation

@mmacata
Copy link
Member

@mmacata mmacata commented Feb 4, 2026

This PR

  • leaves output of GRASS GIS module description as is (just to clarify)
  • moves previous returns items from actinia module to parameters (as it really is a template placeholder value which needs to be filled, even though in the end an output is created)
  • default endpoint behaviour without HTTP GET parameter is to return empty returns array for actinia modules
  • adds HTTP GET parameter returns to both /modules and /actinia_modules endpoints
  • when returns=export is specified, it looks up export statements in the process chain template and adds them to the results array
  • it is possible that returns=persistent will be added in the future to add all parameters which have the 'gisprompt.age' == 'new', value from GRASS GIS. This won't work out-of-the-box because only the GRASS GIS modules which have a placeholder in the template are requested for self-description yet.

Example of new self description for default actinia module slope_aspect

{
  "categories": [
    "actinia-module",
    "global-template"
  ],
  "description": "Calculates slope and aspect of elevation map.",
  "id": "slope_aspect",
  "parameters": [
    {
      "default": "FCELL",
      "description": "Type of output aspect and slope maps. Storage type for resultant raster map.  [generated from r.slope.aspect_precision]",
      "name": "datatype",
      "optional": true,
      "schema": {
        "enum": [
          "CELL",
          "FCELL",
          "DCELL"
        ],
        "type": "string"
      }
    },
    {
      "description": "Name for output slope raster map.  [generated from r.slope.aspect_slope]",
      "name": "name_of_output_slope",
      "optional": true,
      "schema": {
        "subtype": "cell",
        "type": "string"
      }
    },
    {
      "description": "Name for output aspect raster map.  [generated from r.slope.aspect_aspect]",
      "name": "name_of_output_aspect",
      "optional": true,
      "schema": {
        "subtype": "cell",
        "type": "string"
      }
    }
  ],
  "projects": [],
  "returns": [
    {
      "description": [
        "Exported result from exporter r.slope.aspect aspect parameter"
      ],
      "name": "{{ name_of_output_aspect }}",
      "schema": {
        "subtype": "GTiff",
        "type": "raster"
      }
    },
    {
      "description": [
        "Exported result from exporter exporter raster parameter"
      ],
      "name": "{{ name_of_output_slope }}",
      "schema": {
        "subtype": "GTiff",
        "type": "raster"
      }
    }
  ]
}

Example of new self description for default actinia module point_in_polygon

{
  "categories": [
    "actinia-module",
    "global-template"
  ],
  "description": "Imports point and polygon and checks if point is in polygon.",
  "id": "point_in_polygon",
  "parameters": [
    {
      "description": "The input source that may be a landsat scene name, a sentinel2 scene name, a postGIS database string, or an URL that points to an accessible raster or vector file [generated from import_descr_source]",
      "name": "url_to_geojson_point",
      "optional": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "projects": [
    "nc_spm_08"
  ],
  "returns": [
    {
      "description": [
        "Exported result from exporter exporter map parameter"
      ],
      "name": "point",
      "schema": {
        "subtype": "GeoJSON",
        "type": "vector"
      }
    }
  ]
}

Copy link
Member

@linakrisztian linakrisztian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks:)

@mmacata
Copy link
Member Author

mmacata commented Feb 11, 2026

Tests for GRASS GIS 8.3 fail because base image is not updated (e.g with actinia-org/actinia-docker#130). @anikaweinmann what do you think - should we still support G83 in the tests?

@neteler
Copy link
Member

neteler commented Feb 11, 2026

FYI: the latest GRASS GIS 8.3.2 release is from 07 Mar 2024 (https://grass.osgeo.org/about/history/releases/), almost 2 years ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants