2

I am trying to use the QGIS (2.6.1) vector analysis tool "Points in Polygon". The points originally came from a KML file and the polygons I created new. I initially had a warning about different CRS but resolved that by saving the files as shape files with ESPG:4326 WGS84 CRS. Now the tool runs fine but the PNTCNT field in the resulting shapefile is all NULLs.

Am I missing something? What should I check for?

  • How did you save the files as WGS84? There's a bug in the export (save as) dialog where if you select 'same as canvas' it doesn't. You need to select 'as specified below' and then populate the 'below' to get it to project. – Michael Stimson Apr 17 '15 at 0:04
  • Another possible problem is bad geometries, specifically the polygons, self-intersections and incorrect ring orientations cause havoc to an intersect operator... there's a discussion about finding/fixing these problems faunaliagis.wordpress.com/2013/08/14/… If you have Esri (or are friendly with someone who has) you (or they) can use the Repair Geometry tool to fix any potential errors. – Michael Stimson Apr 17 '15 at 0:22
  • Thanks Michael - I think bad geometries is the issue as you suggest. I tried with very simple polygon layer (one square, one triangle) and that worked. I found one error in the original polygon shape file - fixed that manually but still no joy. I think I'll try recreating that polygon layer. – David Robinson Apr 17 '15 at 22:02
1

Solved by recreating the polygon layer paying close attention to the geometries as I went (and checked some bad habits drawing them).

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.