Skip to content
Permalink
Browse files

fix #2056

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12283 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 29, 2009
1 parent 7657802 commit 757e7344f23a99c4cdd03183c39d8da082c90f7e
Showing with 4 additions and 0 deletions.
  1. +4 −0 python/plugins/fTools/tools/doGeometry.py
@@ -456,6 +456,10 @@ def polygon_centroids( self ):
cx+=((line[i].x()-xmin)+(line[j].x()-xmin))*factor
cy+=((line[i].y()-ymin)+(line[j].y()-ymin))*factor
area+=factor

if area==0:
continue

cx/=area*3.00
cy/=area*3.00
outfeat.setGeometry( QgsGeometry.fromPoint( QgsPoint( cx+xmin, cy+ymin ) ) )

0 comments on commit 757e734

Please sign in to comment.