2

I am using the BirdLife International .gdb file (polygons) of bird species distributions to try and make a species richness map across the Brazilian Amazon. To do this I have clipped the global distributions file to my study area. I have also created a hexagonal grid of my study area.

My method so far has been to intersect these two layers to split the distributions into the hexagonal grid cells. From this I am getting the polygon centroids and counting the number of points in each of the original hexagon cells. This has already worked for the IUCN mammal and amphibian shapefiles.

However, when I try to intersect the birdlife distribution layer with the hexagonal cells I get an invalid geometry error even though I have validated the geometries using the QGis Validate geometries tool, and removed invalid geometries.

error invalid geometry detected in input layer A, feature 42

I have also tried checking the geometries in ArcMap10 and they appear to be valid. The problem also continued after deleting the features the error message highlighted.

Is there a method that would avoid this error or would solve this problem?

  • What is the precise error message that you receive? – PolyGeo Feb 20 '17 at 20:04
  • i don't have the exact message but it was something along the lines of "error invalid geometry detected in input layer A, feature 42." I tried deleting this but it still returned the same error. – Tom Feb 20 '17 at 21:18
  • Did you try to rebuild that specific feature? Or just export everything to a new shape. Do the projections match? – DirkB. Feb 20 '17 at 21:23
  • I just deleted the feature from the shapefile and tried again with the result. The projections match up. – Tom Feb 20 '17 at 21:37
  • What happens if you save out a new shapefile from that shapefile and try the process on the new one? – artwork21 Feb 21 '17 at 13:52
1

Try to find and fix the problematic features. I find that when intersecting most errors occur from a) remaining points from inner rings b) folded geometries or "cropped" polygons that result in bad nodes order along the perimeter of the polygon. Some cases of these 2 categories produce valid geometries. What i find helpfull is intersecting through postgres which returns errors in coordinates albeit one by one (it does not list them all at once) and go fix them manually. If you expect many errors other methods are required.

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.