I have two polygon shapefiles and I want to see to what extent the observed amount of overlap is due to chance.
I'm thinking of some kind of permutation test, but not sure of the best way to proceed.
One idea is randomly relocating the polygons in one shapefile to new locations, measuring the total area of intersection, then repeating this a thousand times or so to get a distribution of areas of intersection. Then I can measure how likely the observed area is compared to the distribution of random areas. I have a recent GIS question relates to this approach, it was a comment on that question motivated this question.
Another idea is to combine the two polgyon shapefiles into one shapefile, then randomly reassign the labels of the two types of polygon, measure the total area of intersection under the new labelling scheme, then repeat, etc. as above.
The specific use-case is something like this: one polygon shapefile contains polygons of human activity areas (a few larger polygons). The other polygon shapefile contains polygons of rock outlines (many smaller polygons). The question is whether the observed arrangement of rocks is determined by the activity areas or not: did people put rocks on their activity areas or are we just looking at a natural distribution of rocks?
Are either of the two ideas to test this on the right track, or should I be thinking of something completely different? Any insights would be most welcome!