Skip to content

Commit

Permalink
[processing][grass] Fix generation of output for v.rast.stats, add test
Browse files Browse the repository at this point in the history
(cherry-picked from a463af3)
  • Loading branch information
nyalldawson committed Jul 25, 2018
1 parent 8ad59aa commit a9646f1
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/v_rast_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def processOutputs(alg, parameters, context, feedback):
fileName = alg.parameterAsOutputLayer(parameters, 'output', context)
grassName = alg.exportedLayers['map']
dataType = 'auto'
alg.exportVectorLayer(grassName, fileName, dataType)
alg.exportVectorLayer(grassName, fileName, dataType=dataType)
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,38 @@ tests:
geometry:
precision: 7

- algorithm: grass7:v.rast.stats
name: V.rast.stats
params:
GRASS_MIN_AREA_PARAMETER: 0.0001
GRASS_OUTPUT_TYPE_PARAMETER: 0
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
GRASS_SNAP_TOLERANCE_PARAMETER: -1.0
GRASS_VECTOR_DSCO: ''
GRASS_VECTOR_LCO: ''
column_prefix: s
map:
name: custom/zonal_stats.shp
type: vector
method:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
percentile: 90
raster:
name: dem.tif
type: raster
results:
output:
name: expected/grass7/v_rast_stats.shp
type: vector

0 comments on commit a9646f1

Please sign in to comment.