Name

ST_Touches — Returns TRUE if the geometries have at least one point in common,
but their interiors do not intersect.

Synopsis

boolean ST_Touches(geometry
g1, geometry
g2);

Description

Returns TRUE if the only points in common between
g1 and g2 lie in the union of the
boundaries of g1 and g2.
The ST_Touches relation applies
to all Area/Area, Line/Line, Line/Area, Point/Area and Point/Line pairs of relationships,
but not to the Point/Point pair.

In mathematical terms, this predicate is expressed as:

The allowable DE-9IM Intersection Matrices for the two geometries are:

FT*******

F**T*****

F***T****

Do not call with a GEOMETRYCOLLECTION as an argument

This function call will automatically include a bounding box
comparison that will make use of any indexes that are available on
the geometries. To avoid using an index, use _ST_Touches instead.