This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Compariing spatial objects for equality is very subtle, because you have to define what is meant by equal. In the case of polygons, you can have 2 different polygons that describe the same shape, but have a different start and end point. Most people would say these are the same, but if you compare them exactly, they are in fact different. For instance:
These 2 sets of points describe the same shape just from different starting points. The same problem exists with lines - the same line specified backwards and forwards looks the same on a map, but would not be superficially equals.
The easiest way to test for equality is to test: does object A contain object B and also, does object B contain object A. If they both contain each other, they must cover the exact same area on a map.
In a formula or filter tool, you can say: ST_Contains([A],[B]) AND ST_Contains([B],[A)
In a SpatialMatch tool, you have to use a custom DE-9IM string to describe the match you want. In this case, use the string "T*F**FFF*". I won't try to document that string - see https://en.wikipedia.org/wiki/DE-9IM for a reference of how that works.
Attached is a module (for Alteryx 10) that demonstrates both techniques: