ST_Touches — Returns true if two geometries have at least one point in common, but their interiors do not intersect.
TRUE if the only points in common between
g2 lie in the union of 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:
Enhanced: 3.0.0 enabled support for
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
This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s184.108.40.206 // s220.127.116.11
This method implements the SQL/MM specification. SQL-MM 3: 5.1.28
ST_Touches predicate returns
TRUE in all the following illustrations.
SELECT ST_Touches('LINESTRING(0 0, 1 1, 0 2)'::geometry, 'POINT(1 1)'::geometry); st_touches ------------ f (1 row) SELECT ST_Touches('LINESTRING(0 0, 1 1, 0 2)'::geometry, 'POINT(0 2)'::geometry); st_touches ------------ t (1 row)