mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
fix #2056
git-svn-id: http://svn.osgeo.org/qgis/trunk@12283 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
7f3c4356c4
commit
b426569724
@ -456,6 +456,10 @@ class geometryThread( QThread ):
|
||||
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 ) ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user