Skip to content

Commit

Permalink
[Fix #7360] - Fix Dealauney to vector api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayan committed Apr 15, 2013
1 parent 4e257bd commit 58737b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/plugins/fTools/tools/doGeometry.py
Expand Up @@ -655,14 +655,17 @@ def delaunay_triangulation( self ):
indicies = list( triangle )
indicies.append( indicies[ 0 ] )
polygon = []
attrs = []
step = 0
for index in indicies:
vprovider.getFeatures( QgsFeatureRequest().setFilterFid( ptDict[ ids[ index ] ] ) ).nextFeature( inFeat )
geom = QgsGeometry( inFeat.geometry() )
point = QgsPoint( geom.asPoint() )
polygon.append( point )
if step <= 3: feat.setAttribute( step, QVariant( ids[ index ] ) )
if step <= 3:
attrs.append(QVariant( ids[ index ] ) )
step += 1
feat.setAttributes(attrs)
geometry = QgsGeometry().fromPolygon( [ polygon ] )
feat.setGeometry( geometry )
writer.addFeature( feat )
Expand Down

0 comments on commit 58737b6

Please sign in to comment.