6

I'm trying to intersect two layers in QGIS, similar to this unanswered question. I've performed Vector > Geometry Tools > Check Geometry Validity and I've run GRASS's v.clean, per these questions.

I'm still getting this response:

GEOS geoprocessing error: One or more input features have invalid geometry.

  • Is there a better way to check geometry?
  • Is there a way QGIS can tell me where the problem in the geometry is?
  • Can anyone see what I'm doing wrong using my files?

Here is a link to the underlying set of Voronoi polygons I want to intersect: https://www.dropbox.com/s/edev53n7nn7b6wy/Voronoi1.zip?dl=0

Here is a link to the problematic outline of Liberia that's giving me an "invalid geometry" error when I try intersecting it with the above (already run through Check Validity and v.clean): https://www.dropbox.com/s/4oa7ln7rk2n6e23/Liberia%20Outline%20Valid%20Cleaned.zip?dl=0

  • How is your question different from gis.stackexchange.com/questions/249922/… ? – Richard Law Oct 22 '17 at 3:20
  • I posted the datasets which produce the error. – snadhelta Oct 22 '17 at 3:28
  • Try Simplify geometries in Vector | Geometry tools. You are in Latlong coordinates but setting Tolerance at around 0.0001 won't deteriorate the quality too much. – Kazuhito Oct 22 '17 at 9:56
  • I repeated the steps and found an intersection, see below. So I wonder what you are doing differently? Can you repeat below and see if it works? – Martin Hügi Oct 22 '17 at 10:09
  • @MartinHügi In this op, the issue snadhelta has been facing is that v.clean does not produce expected result. (You have fixed the invalid geometry immediately in the Check validity process.) – Kazuhito Oct 22 '17 at 12:22
7

I ran the Check validity from the dropdown

enter image description here

Used the default settings

![enter image description here

The result was an Invalid Output

enter image description here

I then copied and pasted the co-ordinated into the QGIS project window screen (Centre bottom) and zoomed in until I found an intersection...

enter image description here

I deleted three nodes to remove the spike intersecting and ran the Intersection to get the result.

enter image description here

  • Strange -- I ran Check Validity, following the same steps as you, and QGIS spit me out a "Valid output" layer. But when I zoomed in on the place you flagged and fixed the spike, the intersection worked like a charm. There must be something I still don't understand about Check Validity. Are there thresholds I can set for Check Validity somewhere, a la v.clean? . . . At any rate, the immediate problem is solved. Thanks very much for checking the validity for me. – snadhelta Oct 22 '17 at 15:05
  • 2
    I have just repeated the 'Check validity' but instead of using the default method "The one selected in digitizing settings" I chose "QGIS" and then tried "GEOS". The "QGIS" option found the error, the "GEOS" did not. I went to Settings > Options > Digitizing to check what my default was and it is "QGIS". What options do you have in the 'Check validity' tool and what do you have in your Digitizing settings? The only thing I can think of is that perhaps you didn't check 'Liberia Outline Valid Cleaned' by not selecting it in the 'Input layer' drop down of the 'Check validity' tool? Easy to do. – Martin Hügi Oct 22 '17 at 16:19
  • 1
    I closed out of QGIS and opened it again, checked that my "Digitizing" setting was "QGIS", and tried Check Validity again . . . Lo and behold, it found the error, in the same place you had found it. Who knows what I was doing wrong before, but happy to have solved it. Thanks again. – snadhelta Oct 23 '17 at 2:06

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.