This function returns true if the bounding boxes of two pcpatch objects or the bounding boxes of a pcpatch object and a geometry object intersect.
Syntax
boolean ST_intersects(pcpatch pp1, pcpatch pp2);
boolean ST_intersects(geometry g, pcpatch pp1);
Parameters
Parameter | Description |
---|---|
pp1 | Pcpatch object 1. |
pp2 | Pcpatch object 2. |
g | The geometry object of Ganos Geometry. |
Examples
-- Patch should intersect itself
SELECT ST_Intersects(
'01010000000000000001000000C8CEFFFFF8110000102700000A00'::pcpatch,
'01010000000000000001000000C8CEFFFFF8110000102700000A00'::pcpatch);
------------------------
t
SELECT ST_Intersects('SRID=4326;POINT(-126.451 45.552)'::geometry, pa) FROM patches WHERE id = 7;
------------------------
t