ST_Equals
Signatures
Description
Return true if geomA
is topologically equal to geomB
.
Equal means:
- Shapes of
geomA
andgeomB
have exactly the same shape. I.e.,ST_Within(A, B) = true
andST_Within(B, A) = true
. - The directionality and the order of points is ignored.
Implements the OpenGIS Simple Features Implementation Specification for SQL version 1.2.1.
This predicate does not yet support spatial indices, but it will in a future release. Use it in conjunction with &&
operator. See here for more details.
Examples
Cases where ST_Equals
is true
geomA POLYGON | geomB POLYGON |
---|---|
POLYGON((1 1, 4 1, 4 4, 1 4, 1 1)) | POLYGON((1 1, 4 1, 4 4, 1 4, 1 1)) |
geomA POLYGON | geomB POLYGON |
---|---|
POLYGON((1 1, 4 1, 4 4, 1 4, 1 1)) | POLYGON((4 4, 4 1, 1 1, 1 4, 4 4)) |
geomA LINESTRING | geomB LINESTRING |
---|---|
LINESTRING(1 1, 4 4) | LINESTRING(1 1, 3 3, 4 4) |