5

I am attempting to mask a raster to US Forest Service boundaries in QGIS. It fails due to self - intersections of polygons.

Warning 1: Ring Self-intersection at or near point -109.90112962000001 43.649977879999994
ERROR 1: Cutline polygon is invalid.

I have run the check validity tool and a new shapefile is created but it too finds the same error when attempting to mask the raster to the "valid" shapefile.

I have also attempted to dive into the v.clean tool with unsuccessful results using both bpol and snap separately. I don't fully understand what this tool is doing, but it outputs a number of polygons that match some Forest Service land but excludes the majority of their land.

I also ran v.build.check to find topological errors and it created an output that is seemingly empty. Nothing in the attribute table, nothing visible on the map.

There have been similar questions on here but I haven't been able to make their solutions work.

UPDATE: I downloaded and used Grass to attempt to fix the self-intersecting polygons. Grass upon v.in.ogr recommended I snap at 1e-6. I did this and the output said I had 1 area overlapping left, when previously I had thousands. So I saved the shapefile and imported to QGIS to being my analysis over there. The check validity tool found 185 self-interesecting polygons.

enter image description here

Still unable to use the clipper to create a Mask, I decided to look at the error output on the Map. The snapping tool isn't fixing these nodes.

enter image description here

Here's a larger picture of the area. enter image description here

I wonder if it would be easiest just to dissolve these shapes in some way.

  • Could you find the polygon that is claimed to be faulty and add that into your question as WKT? – user30184 Dec 18 '17 at 9:36
  • I used the topology checker for this and found 37 polygons with invalid geometry at that point I wasn't sure what to do. – apetbrown Dec 18 '17 at 19:01
  • Did you solve your question? – nanunga Jun 29 '18 at 10:49
9

When I get errors like this I usually find applying a zero distance buffer can fix the geometries. So use the buffer tool in QGIS and set the buffer distance to 0 units. Then try and use this buffered layer as the mask.

  • Thanks, this seems to have worked so far. Though while reading the log as the mask was created it did state there were overlapping issues it was ignoring and that the centroid of the polygon could not be found. – apetbrown Dec 18 '17 at 19:00
0

I managed to clip a vectorized raster just like the one in your picture after doing a "multipart to single part" and it didn't skip any polygon, though it keeps displaying the polygons with the overlapping vertices.

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.