4

I am trying to perform a vector clip analysis (vector-->geoprocessing tools pull-down menu) using two complicated vector layers and am getting erroneous results. The clip 'Input layer' is shown here:

'Input layer'

and the 'Clip layer' is shown here:

'Clip layer'

Both layers are in the same projection (EPSG 2229) and neither layer has any features selected. However, the analysis result (below) is incomplete, it ignores the two input layer features furthest to the west (blue and purple). The result would be expected if I had all but the two furthest west input features selected, but this is not the case. Furthermore, I have performed the same analysis in different work sessions (and even the prior QGIS version 2.18.13) and gotten different results, but always with at least one of the input features being ignored (either wholly or partially).

enter image description here

I have been able to perform complicated clip analyses in QGIS many times in the past. Sometimes it would take a while, but I could count on valid results. I think this problem first started presenting itself within the last couple of months... I'm not sure what changed. Has anybody else had this problem? Any suggestions?

  • 1
    Can you check for invalid geometries using the topology checker – Liam G Nov 2 '17 at 0:39
  • OK, thanks @Freighty good call. I used the topology checker and found that both the input layer and the clip layer have errors: gap (many), overlap (few), and invalid geometry (few) and that both layers have zero duplicate errors. I guess these could be the problem? However, I did the exact same clip analysis in ArcGIS 10.3 and got the result I was expecting (nothing missing) and the analysis took less than 10 seconds. – nate page Nov 2 '17 at 16:41
  • If you try and fix the invalid geometries (sometimes applying a buffer of zero metres can fix them) it may help. I'm not sure how the algorithms in QGIS and ArcGIS work, but I do know that the ones in QGIS can have issues with invalid geometries, but I've mostly encountered them using intersects and other tools. Always worth looking at if nothing else looks obviously wrong. – Liam G Nov 2 '17 at 22:39
  • Cool. Thanks again. FYI, I am now having the same problem with the Difference geoprocessing tool using two different shapefiles... Just for the sake of full disclosure I am on a 64-bit Win7 Professional Dell Precision M4800 with 16 gb RAM and using QGIS 2.18.14 64-bit version. – nate page Nov 3 '17 at 0:40
  • 1
    UPDATE/WORK AROUND SOLUTION: I tried this analysis again in QGIS using the SAGA 'Polygon clipping' tool instead and it worked perfectly with much faster performance, similar to the operation performance in ArcGIS 10.3. It seems that the take home from this is to be wary of the built in QGIS geoalgorithms and don't be afraid to dig deeper into the Processing Toolbox even for basic geoprocessing needs. Cheers. – nate page Nov 11 '17 at 0:29

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.