Equals (spatial predicate)
True when two geometries represent the exact same set of points (spatially equal).
Category: Topology · Also known as: ST_Equals, spatial equals
Definition (expanded)
Spatial equality means the shapes match as geometries, not as text. Two polygons can be spatially equal even if their vertex order differs, ring orientation differs, or they use different but equivalent segmentations along the boundary.
Examples
PostGIS equals
SQL
SELECT ST_Equals(a.geom, b.geom) FROM a, b;
Common mistakes
- Comparing WKT strings directly instead of comparing geometries (string equality is stricter).
Related terms
Intersects (spatial predicate)True when two geometries share any point in common (touching or overlapping).PolygonA closed area geometry defined by an exterior ring and optional interior rings (holes).Valid geometryA geometry that follows topological rules (closed rings, no self-intersections, properly nested holes, etc.).