Skip to content

Commit

Permalink
[processing] fix GRASS v.buffer algorithm for case when buffer distance
Browse files Browse the repository at this point in the history
is taken from the field (fix #19377)

(cherry picked from commit bfb60e4)
  • Loading branch information
alexbruy authored and nyalldawson committed Jan 25, 2019
1 parent 42c7712 commit 3331959
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v.buffer
Creates a buffer around vector features of given type.
Creates a buffer around vector features of given type.
Vector (v.*)
QgsProcessingParameterFeatureSource|input|Input vector layer|-1|None|False
QgsProcessingParameterString|cats|Category values|None|False|True
Expand All @@ -8,6 +8,7 @@ QgsProcessingParameterEnum|type|Input feature type|point;line;boundary;centroid;
QgsProcessingParameterNumber|distance|Buffer distance in map units|QgsProcessingParameterNumber.Double|None|True|None|None
QgsProcessingParameterNumber|minordistance|Buffer distance along minor axis in map units|QgsProcessingParameterNumber.Double|None|True|None|None
QgsProcessingParameterNumber|angle|Angle of major axis in degrees|QgsProcessingParameterNumber.Double|0.0|True|0.0|360.0
QgsProcessingParameterString|layer|Layer number or name ('-1' for all layers)|-1|False|False
QgsProcessingParameterField|column|Name of column to use for buffer distances|None|input|-1|False|True
QgsProcessingParameterNumber|scale|Scaling factor for attribute column values|QgsProcessingParameterNumber.Double|1.0|True|None|None
QgsProcessingParameterNumber|tolerance|Maximum distance between theoretical arc and polygon segments as multiple of buffer|QgsProcessingParameterNumber.Double|0.01|True|None|None
Expand Down
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 @@ -331,6 +331,39 @@ tests:
name: expected/grass7/buffer_polys_layer2.shp
type: vector

- algorithm: grass7:v.buffer
name: Buffer using value from field
params:
-c: false
-s: false
-t: false
GRASS_MIN_AREA_PARAMETER: 0.0001
GRASS_OUTPUT_TYPE_PARAMETER: 0
GRASS_SNAP_TOLERANCE_PARAMETER: -1.0
GRASS_VECTOR_DSCO: ''
GRASS_VECTOR_LCO: ''
angle: 0.0
cats: ''
column: id2
input:
name: points.gml|layername=points
type: vector
layer: points
scale: 1.0
tolerance: 0.01
type:
- 0
- 1
- 4
where: ''
results:
output:
name: expected/grass7/buffer_points_field.shp
type: vector
compare:
fields:
fid: skip

- algorithm: grass7:v.surf.rst.cvdev
name: v.surf.rst - cross-validation errors
params:
Expand Down

0 comments on commit 3331959

Please sign in to comment.