Skip to content

Commit 71fa5d4

Browse files
committed
[processing] fix Convex Hull algorithm (fix #12643)
1 parent 584f192 commit 71fa5d4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

python/plugins/processing/algs/qgis/ConvexHull.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def processAlgorithm(self, progress):
6464
useField = self.getParameterValue(self.METHOD) == 1
6565
fieldName = self.getParameterValue(self.FIELD)
6666

67-
f = QgsField('value')
67+
f = QgsField('value', QVariant.String, '', 255)
6868
if useField:
6969
index = layer.fieldNameIndex(fieldName)
7070
fType = layer.pendingFields()[index].type()
@@ -79,12 +79,11 @@ def processAlgorithm(self, progress):
7979
f.setType(QVariant.String)
8080
f.setLength(255)
8181

82-
fields = [
83-
QgsField('id', QVariant.Int, '', 20),
84-
f,
85-
QgsField('area', QVariant.Double, '', 20, 6),
86-
QgsField('perim', QVariant.Double, '', 20, 6)
87-
]
82+
fields = [QgsField('id', QVariant.Int, '', 20),
83+
f,
84+
QgsField('area', QVariant.Double, '', 20, 6),
85+
QgsField('perim', QVariant.Double, '', 20, 6)
86+
]
8887

8988
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
9089
fields, QGis.WKBPolygon, layer.dataProvider().crs())

0 commit comments

Comments
 (0)