Skip to content
Permalink
Browse files

[processing] fix Convex Hull algorithm (fix #12643)

  • Loading branch information
alexbruy committed May 20, 2015
1 parent 584f192 commit 71fa5d41a173c55a2369d92f111d06aeb64091de
Showing with 6 additions and 7 deletions.
  1. +6 −7 python/plugins/processing/algs/qgis/ConvexHull.py
@@ -64,7 +64,7 @@ def processAlgorithm(self, progress):
useField = self.getParameterValue(self.METHOD) == 1
fieldName = self.getParameterValue(self.FIELD)

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

fields = [
QgsField('id', QVariant.Int, '', 20),
f,
QgsField('area', QVariant.Double, '', 20, 6),
QgsField('perim', QVariant.Double, '', 20, 6)
]
fields = [QgsField('id', QVariant.Int, '', 20),
f,
QgsField('area', QVariant.Double, '', 20, 6),
QgsField('perim', QVariant.Double, '', 20, 6)
]

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

0 comments on commit 71fa5d4

Please sign in to comment.