touches function

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

Syntax

touches( a, b )

Arguments

a → geometry b → geometry

Example

 touches( geomFromWKT( 'LINESTRING(5 3 , 4 4)'  ) , geomFromWKT( 'LINESTRING(3 3 , 4 4 , 5 5)' ))    → returns 1
 touches( geomFromWKT( 'POINT(4 4)' ) , geomFromWKT( 'POINT(5 5)' ))                     → returns 0