4

New to QGIS, using 2.14.0 on Windows 7

I am trying to run Vector -> Analysis Tools -> Points in Polygon... on these data. I want to get the PNTCNT and summary statistics on the Amount attribute. However, every time I run Points in Polygon..., I get a "crash dumped" error after reaching 99%:

Crash Dump Error when running **Points in Polygon**

The only other relevant question I've seen regarding this issue didn't have much in the way of responses. It did have a question in response asking if each layer was a shapefile. In my instance I am trying Points in Polygon... with a shapefile and a .csv layer. I'm not sure if that may be my problem. However, I tried saving my delimited layer as a shapefile and trying this again, with no luck.

Also, I've tried Vector -> Data Management Tools -> Join Attributes by Location... and I get a Python error (screenshot with data).

This all leads me to wonder if there is an issue in my data.

  • 3
    Wanted to reproduce your error messages, but I am missing the vector menu in my 2.14.0 installation (in 2.8.7 on another maschine its present). But running the Count points in polygon tool from processing toolbox raises errors on missing CRS, even if EPSG:4326 is shown. OGR protocol says: invalid datasource, DelimitedText log says: Errors in line 246, 248 (there are invalid coordinates). Have you tried to save both dataset as new layers, and tested again? – Detlev Mar 31 '16 at 9:20
  • I have now. Unfortunately, no luck. – twgardner2 Mar 31 '16 at 18:30
5

As @Detlev suggested, you should re-save both your layers but this doesn't fully solve the problem as I tested your shapefiles and still received the error. Therefore I suggest to do the following:

  1. Re-save both layers to the same CRS using the Save As... option (I added the prefix "NEW_" which can be seen in the images below).
  2. Use the GRASS algorithm v.clean from the Processing Toolbox with the following parameters on your polygon shapefile:

    GRASS v.clean

    Note that this may take a while (took my computer about 20 minutes).

  3. Now run the Count points in polygon tool from the Processing Toolbox using the Cleaned shapefile as polygons:

    Count points in polygon

  4. You should now have the polygon shapefile with a new NUMPOINTS field (or whatever you named it) in the attribute table:

    Results

  • Thanks for the feedback. Unfortunately, I can't get v.clean to run on my shapefile. The log seems to be telling me I have an invalid N latitude, so I've tried selecting the region/extend on canvas. When I select a large enough area, the algorithm runs further, but throws the following: Converting outputs Loading resulting layers The following layers were not correctly generated. Cleaned Errors If you were able to clean the .shp, would you mind sticking it here for me to try? – twgardner2 Mar 31 '16 at 18:34
  • 1
    @twgardner2 - Weird, but I've uploaded the cleaned shapefile and the results of what I obtained =) – Joseph Apr 1 '16 at 9:36
  • Thank you! Just to let you know, I was able to get my .shp cleaned by importing it into GRASS. I'm not really sure what I was doing, but I got a file I could run Point in Polygon... on back in QGIS. It resulted in the same partial results you got above. Thanks for all the help. – twgardner2 Apr 1 '16 at 17:57
  • 1
    @twgardner2 - Most welcome! And atleast you got the same results in the end :) – Joseph Apr 4 '16 at 8:37

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.