6

I want to intersect contours with polygon like in the image below. But I got this error:

Warnings:
GEOS geoprocessing error: One or more input features have invalid geometry.
Some output geometries may be missing or invalid.

I don't know what's wrong with my geometries. I even don't know, where to search. I tested it also with a simple single-line. Same thing happened. The result: a empty shapefile

enter image description here

What should I do now? Where can I expect an invalid geometry? Or is it because of the shapefile (OGR ESRI)? Please help!

nmtoken
  • 13,355
  • 5
  • 38
  • 87
MartinMap
  • 8,262
  • 7
  • 50
  • 114
  • 1
    Have you tested the validity of the contours and the polygon layer? (Vector - Geometry tools - Check geometry validity) It should show where the problem is located. – underdark May 25 '12 at 08:35
  • 1
    No errors found! But I do it now with ogr2ogr: http://gis.stackexchange.com/questions/25996/cut-many-lines-with-many-polygons-too-much-for-my-cpu-ram – MartinMap May 25 '12 at 11:11

3 Answers3

2

I just had this error, and re-projecting did not solve the problem. I also ran the Validity tool, and there were no errors. I ran previous intersections with one of the files, so I suspected the new file was causing the problem. I saved it as geojson, then it worked. Not sure why, but it worked.

2

I have encountered the same problem elsewhere. Reset the CRS. Go to Settings>Project Properties> CRS and Set a Reference system again. This should do the job. If not, export it as an ESRI shapefile.

Janus
  • 388
  • 1
  • 12
1

The problem are cross nodes in the shapefile, it's need to edit the shape. Firstly, select the shapefile and go in toggle editing > node tool, then select the shape and a different point will arise, delete or undo the node.