I am using QGIS 1.8 on Windows 7

I want to perform a point in polygon analysis using the Vector > Analysis Tools menu.

My point layer is the result of a SpatiaLite query which returns 10'000 points.

My polygon layer is a simple shapefile with about 150 different polygons. Both layers are in WGS84 (EPSG:4326).

When I click the "OK" button in the Point in Polygon tool, just nothing happens. The progress bar stays at 0%, but I cannot click "Cancel" (i.e. nothing happens). I can click on the Close-Button in the upper right though, the window then disappears.

EDIT: This is the output from the message log:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:\OSGeo4W\apps\qgis\python\plugins\fTools\tools\doPointsInPolygon.py", line 215, in run
    tmpGeom = QgsGeometry(pntFeat.geometry())
TypeError: arguments did not match any overloaded call:
  QgsGeometry(): too many arguments
  QgsGeometry(QgsGeometry): argument 1 has unexpected type 'NoneType'

Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

QGIS version:
1.8.0-Lisboa Lisboa, f440b60

Python path: [...]

I have also tried saving the point layer coming from a SpatiaLite DB as a shapefile and reimporting this shapefile. I have also tried to do it with a much smaller subset of points. No success.

  • This looks like a bug. I see two options to cope with that: check if your point layer contains features without geometry and filter these first. Or try QGIS master and check if the problem is fixed there. In case it's not fixed in master, file a bug. – Matthias Kuhn Jul 10 '13 at 13:51
  • Ciao Mr. Kuhn. ;-) How do I check this with the features? – wnstnsmth Jul 10 '13 at 13:55
  • Mr. Smth, the first solution I can think of is using SQL SELECT COUNT(*) FROM pointsTable WHERE geometryColumn IS NULL to check for the number of such entries and then replace SELECT COUNT(*) with DELETE to remove these. (Make a backup of your file first!) PS: No guarantee for success. This is pure speculation. – Matthias Kuhn Jul 10 '13 at 14:09
  • 1
    The tool is working here. There must be something special about your data / setup. Can you try this analysis in master and report it as a bug if the problem persists, so this can be taken care of before the next release. Thank you in advance. – Matthias Kuhn Jul 10 '13 at 14:23
  • 1
    I installed qgis-dev (1.9.0-Master) and there it works with the same data. Must be a bug in 1.8.0. Or with what version did you check? – wnstnsmth Jul 10 '13 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.