Skip to content
Permalink
Browse files

[Fix #7414] - points in polygon does not work

  • Loading branch information
vinayan committed Apr 13, 2013
1 parent 27f65c2 commit 4e257bdf7e4a014ac7271c00b5f60831262d381f
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/fTools/tools/doPointsInPolygon.py
@@ -169,7 +169,7 @@ def run(self):
fieldList = ftools_utils.getFieldList(self.layerPoly)
index = polyProvider.fieldNameIndex(unicode(self.fieldName))
if index == -1:
index = polyProvider.fieldCount()
index = polyProvider.fields().count()
fieldList.append( QgsField(unicode(self.fieldName), QVariant.Double, "real", 24, 15, self.tr("point count field")) )

sRs = polyProvider.crs()
@@ -218,7 +218,8 @@ def run(self):
interrupted = True
break

outFeat.setAttribute(index, QVariant(count))
atMap.append(QVariant(count))
outFeat.setAttributes(atMap)
writer.addFeature(outFeat)

self.emit( SIGNAL( "updateProgress()" ) )

0 comments on commit 4e257bd

Please sign in to comment.
You can’t perform that action at this time.