Returns true if the bounding boxes of two pcpatch objects intersect, or if the bounding box of a pcpatch object intersects a geometry object.
Syntax
boolean ST_Intersects(pcpatch pp1, pcpatch pp2);
boolean ST_Intersects(geometry g, pcpatch pp1);Parameters
| Parameter | Description |
|---|---|
pp1 | The first pcpatch object. |
pp2 | The second pcpatch object. |
g | The Ganos Geometry geometry object. |
Examples
Check whether a patch intersects itself:
SELECT ST_Intersects(
'01010000000000000001000000C8CEFFFFF8110000102700000A00'::pcpatch,
'01010000000000000001000000C8CEFFFFF8110000102700000A00'::pcpatch);Output:
tCheck whether a geometry point intersects the bounding box of a patch in the patches table:
SELECT ST_Intersects('SRID=4326;POINT(-126.451 45.552)'::geometry, pa)
FROM patches
WHERE id = 7;Output:
t