ST_Relate

Determine whether the intersection matrix of two geometries equals a specified intersection matrix.

Syntax

ST_Relate(geo1, geo2, intersectionMatrix);
geo1
The first input geometry.

Type: VARCHAR(ANY)

geo2
The second input geometry.

Type: VARCHAR(ANY)

intersectionMatrix
Dimensionally Extended 9 Intersection Model (DE-9IM).

Type: CHAR(9)

Returns

A value of type BOOL that is TRUE if the intersection matrix of the two geometries equals the specified intersection matrix; otherwise FALSE.

Examples


SELECT inza..ST_RELATE(inza..ST_WKTToSQL('LINESTRING (0 0, 10 10)'),
            inza..ST_WKTToSQL('LINESTRING (5 5, 11 11)'), '1*T***T**');
 
ST_RELATE
-----------
t
(1 row)

SELECT inza..ST_RELATE(inza..ST_WKTToSQL('POLYGON ((40 120, 90 120, 90 150, 40 150, 40 120))'),
inza..ST_WKTToSQL('POLYGON ((30 110, 50 110, 50 130, 30 130, 30 110))'), 'T*T***FF*');

ST_RELATE
-----------
f
(1 row)