2

I am trying to sum the number of fires in each state of the US. I have a shapefile for the states and I have a shapefile for each fire. Vector->Analysis Tools-> Count points in a polygon isn't working because I keep getting this error but I don't understand it. Does anyone know how to fix this?

line 211, in spatialindex
            idx = QgsSpatialIndex(layer.getFeatures(request))
        Exception: unknown
  • The points in polygon tool will not work if you are using it to count polygons in polygons, or other such irregularities. Can you give more details about your layers, perhaps a screenshot? – HDunn Apr 26 '17 at 12:10
1

I have encountered a similar error before. It may be an issue in the point layer. You can export the layer geometry to .csv using the MMGQIS plugin, then load the .csv back into QGIS and save as a point shape file. As an added precaution check the .csv prior to upload to make sure there aren't any formatting/data issues inside the cells that might cause the file to be misread. Extraneous commas are usually the culprit for me.

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.