Skip to content

Commit be6b2a0

Browse files
committed
fix broken Points in polygon (fix #5389)
1 parent 0586c77 commit be6b2a0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/plugins/fTools/tools/doPointsInPolygon.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,14 @@ def compute(self, inPoly, inPts, inField, outPath, progressBar):
131131
outFeat.setGeometry(inGeom)
132132
pointList = []
133133
count = 0
134-
#(check, pointList) = pointLayer.featuresInRectangle(inGeom.boundingBox(), True, True)
135-
#pointLayer.select(inGeom.boundingBox(), False)
136-
#pointList = pointLayer.selectedFeatures()
137134
pointList = spatialIndex.intersects(inGeom.boundingBox())
138135
if len(pointList) > 0: check = 0
139136
else: check = 1
140137
if check == 0:
141138
for i in pointList:
142139
pointProvider.featureAtId( int( i ), inFeatB , True, allAttrs )
143140
tmpGeom = QgsGeometry( inFeatB.geometry() )
144-
if inGeom.intersects(tmpGeom.asPoint()):
141+
if inGeom.intersects( tmpGeom ):
145142
count = count + 1
146143
outFeat.setAttributeMap(atMap)
147144
outFeat.addAttribute(index, QVariant(count))

0 commit comments

Comments
 (0)