ST_Touches(A, B) returns true if both the following are true:
- At least one point in the set of points that comprises A is also a member of the set of points that make up B.
- No points that make up the interior of A are also part of the interior of B.
ST_Touches works on the following data types:
“ will attempt to use any available to speed up its operation. Use the prefixed variant
_ if you do not want any spatial indexes to be used.Examples
The screenshots in these examples were generated using geojson.io, but they are designed to showcase the shapes, not the map. Representing
GEOMETRY data in GeoJSON can lead to unexpected results if using geometries with other than 4326 (as shown below).True
In this example, “ returnstrue because both of the following are true:
- At least one point in the set of Points that comprise Polygon A is a member of the set of points that make up the LineString B.
- No points from the interior of A are also part of the interior of B.

False
In this example, “ returnsfalse because:
- Some points from the interior of the LineString B are also part of the interior of the Polygon A.


