ST_Crosses

Determine if two geometries cross each other, that is, whether their DE-9IM intersection matrix is T*T****** or, for two lines, 0********.

All coordinate systems are treated as being Cartesian.

Syntax

ST_Crosses(geo1, geo2);
geo1
The first input geometry.

Type: ST_GEOMETRY(ANY)

geo2
The second input geometry.

Type: ST_GEOMETRY(ANY)

Returns

A value of type BOOL that is TRUE if the first geometry crosses the second geometry; otherwise FALSE.

Examples

SELECT inza..ST_Crosses(inza..ST_WKTToSQL('LINESTRING (0 0, 10 10)'),
          inza..ST_WKTToSQL('LINESTRING (0 5, 10 5)'));

ST_CROSSES
----------
t
(1 row)