diff --git a/python/plugins/processing/algs/grass7/ext/v_vect_stats.py b/python/plugins/processing/algs/grass7/ext/v_vect_stats.py index 788b4234d60..f0f38c52c11 100644 --- a/python/plugins/processing/algs/grass7/ext/v_vect_stats.py +++ b/python/plugins/processing/algs/grass7/ext/v_vect_stats.py @@ -36,4 +36,4 @@ def processOutputs(alg, parameters, context, feedback): fileName = alg.parameterAsOutputLayer(parameters, 'output', context) grassName = alg.exportedLayers['areas'] dataType = 'auto' - alg.exportVectorLayer(grassName, fileName, dataType) + alg.exportVectorLayer(grassName, fileName, dataType=dataType) diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.dbf b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.dbf new file mode 100644 index 00000000000..81586dfe537 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.dbf differ diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj new file mode 100644 index 00000000000..a30c00a55de --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shp b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shp new file mode 100644 index 00000000000..1566b4c1d91 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shp differ diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shx b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shx new file mode 100644 index 00000000000..63aed4072ca Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shx differ diff --git a/python/plugins/processing/tests/testdata/grass7_algorithms_vector_tests.yaml b/python/plugins/processing/tests/testdata/grass7_algorithms_vector_tests.yaml index a5021afd8e9..0a6c4edf164 100644 --- a/python/plugins/processing/tests/testdata/grass7_algorithms_vector_tests.yaml +++ b/python/plugins/processing/tests/testdata/grass7_algorithms_vector_tests.yaml @@ -114,3 +114,28 @@ tests: output: name: expected/grass7/v_what_rast.shp type: vector + + - algorithm: grass7:v.vect.stats + name: v.vect.stats + params: + GRASS_MIN_AREA_PARAMETER: 0.0001 + GRASS_OUTPUT_TYPE_PARAMETER: 0 + GRASS_SNAP_TOLERANCE_PARAMETER: -1.0 + GRASS_VECTOR_DSCO: '' + GRASS_VECTOR_LCO: '' + areas: + name: custom/zonal_stats.shp + type: vector + count_column: count + method: 0 + points: + name: custom/grass7/sample_points.shp + type: vector + points_column: val + stats_column: stat + type: + - 0 + results: + output: + name: expected/grass7/v_vect_stats.shp + type: vector