In map overlay, is intersection of map layers a commutative operation ie layer_A intersection layer_B = layer_B intersection layer_A? If layer A is a square and layer B is a triangle. In this case, (A intersectn B) == (B intersectn A) ?
Hope this figure is explicit enough :
Just like set intersection, geometric intersection (which is essentially an intersection on two sets with spatially defined bounds) is both commutative and associative, e.g. (A ∩ B) ∩ C = A ∩ (B ∩ C) = (C ∩ B) ∩ A = C ∩ (B ∩ A).
In practice, software often uses the order of inputs to determine how attributes are associated with the output; but the spatial output geometry should still be the same regardless of input order.
Also be aware that your output will depend on which coordinate system and projection, if any, you use to carry out the operation. While this will not change the commutative and associate properties, order and grouping might be used to select the projection used for the operation(s).
Mmmm. I too thought it obvious that A ∩ B = B ∩ A, but then Kirk's comment got me thinking. So here's a theory. Feel free to shoot it down in flames!
In this scenario there are two polygons, A (red) and B (blue). The red dots represent the smallest grid precision:
According to my calculations, they intersect here:
Notice how the intersection point snaps to the nearest grid, because that's the smallest precision allowed. In this case the order doesn't matter, and A ∩ B = B ∩ A
Now introduce polygon C (yellow):
The intersection of (A ∩ B) ∩ C is as follows:
And that's because the nearest grid point to the intersection of A and B is as already shown, and overlaid with C is can give that result (my rough sketch is not exactly square so it may not look obvious at a glance). However, (A ∩ C) ∩ B gives this:
That's because the nearest grid to the intersection of A and C causes a different shape for the intersection with B.
So: I would argue that there is no difference with just two polygons, but there could be differences with three or more. With a large precision the differences would be tiny, but I believe they could exist.
Does that look correct, or can anyone pick holes in the concept?!?!?!