Touches (spatial predicate)
True when two geometries touch at the boundary but do not overlap in area (or interior).
Category: Topology · Also known as: ST_Touches, touches predicate, adjacent
Definition (expanded)
Touches is useful for detecting adjacency (shared borders) without overlap. For polygons, touching usually means they share boundary points/segments but their interiors do not overlap.
Examples
PostGIS touches
SQL
SELECT ST_Touches(a.geom, b.geom) FROM a, b;
Common mistakes
- Expecting Touches to be true when polygons overlap (that’s Intersects/Overlaps).
Related terms
Intersects (spatial predicate)True when two geometries share any point in common (touching or overlapping).Overlaps (spatial predicate)True when two geometries overlap partially (they share some interior area) but neither fully contains the other.Disjoint (spatial predicate)True when two geometries share no points at all (no intersection).Contains (spatial predicate)True if geometry A completely contains geometry B (B is inside A, not just touching the edge).Within (spatial predicate)True if geometry A lies completely inside geometry B (the inverse of Contains).