Skip to content

Commit

Permalink
Fix #6063
Browse files Browse the repository at this point in the history
  • Loading branch information
ddanielvaz committed Jul 14, 2013
1 parent f340ca0 commit f8e2cac
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions python/plugins/fTools/tools/doGeoprocessing.py
Expand Up @@ -467,13 +467,9 @@ def convex_hull(self, useField ):
outFeatFields = QgsFields()
if useField:
importedField = vproviderA.fields().at( self.myParam )
outFeatFields.append( importedField )
#
importedFieldName = importedField.name( )
else:
outIdField = QgsField( "hullGeneratedID", QVariant.String )
outFeatFields.append( outIdField )
# creating fields
outFeatFields.append( importedField )
# creating area and perimeter fields
areaField = QgsField("area", QVariant.Double)
perimField = QgsField("perim", QVariant.Double)
# appending fields
Expand Down Expand Up @@ -551,7 +547,6 @@ def convex_hull(self, useField ):
(area, perim) = self.simpleMeasure( outGeom )
for f in inFeat.fields():
outFeat.setAttribute( f.name( ), inFeat.attribute( f.name( ) ) )
outFeat.setAttribute( "hullGeneratedID", 'hullPolygonGenerated' )
outFeat.setAttribute( "area", area )
outFeat.setAttribute( "perim", perim )
writer.addFeature( outFeat )
Expand Down Expand Up @@ -613,7 +608,6 @@ def convex_hull(self, useField ):
(area, perim) = self.simpleMeasure( outGeom )
for f in inFeat.fields():
outFeat.setAttribute( f.name( ), inFeat.attribute( f.name( ) ) )
outFeat.setAttribute( "hullGeneratedID", 'hullPolygonGenerated' )
outFeat.setAttribute( "area", area )
outFeat.setAttribute( "perim", perim )
writer.addFeature( outFeat )
Expand Down

0 comments on commit f8e2cac

Please sign in to comment.