Skip to content

Vector info bug #359

@anikaweinmann

Description

@anikaweinmann

If a vector has no database connection because it has no tabel, actinia returns an error by requesting the information of the vector map:

# test_random_vect created with e.g. grass grassdb/nc_spm_08/PERMANENT/ --exec v.random output=test_random_vect npoints=10

curl -u ${AUTH} ${URL}/locations/nc_spm_08/mapsets/PERMANENT/vector_layers/test_random_vect | jq
{
    ....
    {
      "executable": "v.info",
      "id": "2",
      "mapset_size": 375,
      "parameter": [
        "map=test_random_vect@PERMANENT",
        "-h"
      ],
      "return_code": 0,
      "run_time": 0.10043096542358398,
      "stderr": [
        ""
      ],
      "stdout": "COMMAND: v.random output=\"test_random_vect\" npoints=10 layer=\"-1\" zmin=0.0 zmax=0.0 column_type=\"double precision\"\nGISDBASE: /home/user/actinia/grassdb\nLOCATION: nc_spm_08 MAPSET: PERMANENT USER: user DATE: Wed Jul 20 12:05:35 2022\n"
    },
    {
      "executable": "v.info",
      "id": "3",
      "mapset_size": 375,
      "parameter": [
        "map=test_random_vect@PERMANENT",
        "-c"
      ],
      "return_code": 1,
      "run_time": 0.10044598579406738,
      "stderr": [
        "ERROR: Database connection for map <test_random_vect@PERMANENT> is not defined in DB file",
        ""
      ],
      "stdout": ""
    }
  ],
  "progress": {
    "num_of_steps": 3,
    "step": 3
  },
  "resource_id": "resource_id-9feaee6d-8abf-4253-8437-6a5ee2556d0d",
  "status": "error",
  "time_delta": 0.4676177501678467,
  "timestamp": 1658318803.6137428,
  "urls": {
    "resources": [],
    "status": "http://...:8088/api/v3/resources/actinia-gdi/resource_id-9feaee6d-8abf-4253-8437-6a5ee2556d0d"
  },
  "user_id": "actinia-gdi"
}

The endpoint should not return an error if no table is set for the vector map.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions