დასახელება

ST_Disjoint — Return true if raster rastA does not spatially intersect rastB.

სინოპსისი

boolean ST_Disjoint( raster rastA , integer nbandA , raster rastB , integer nbandB );

boolean ST_Disjoint( raster rastA , raster rastB );

Description

Raster rastA and rastB are disjointed if they do not share any space together. If the band number is not provided (or set to NULL), only the convex hull of the raster is considered in the test. If the band number is provided, only those pixels with value (not NODATA) are considered in the test.

[შენიშვნა]

This function does NOT use any indexes.

[შენიშვნა]

To test the spatial relationship of a raster and a geometry, use ST_Polygon on the raster, e.g. ST_Disjoint(ST_Polygon(raster), geometry).

Availability: 2.1.0

მაგალითები

Rid = 1 has no bands, hence the NOTICE and the NULL value for st_disjoint.

Code
SELECT r1.rid, r2.rid, ST_Disjoint(r1.rast, 1, r2.rast, 1) FROM dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;
Output
NOTICE:  The second raster provided has no bands
 rid | rid | st_disjoint
-----+-----+-------------
   2 |   1 |
   2 |   2 | f

This time, without specifying band numbers.

Code
SELECT r1.rid, r2.rid, ST_Disjoint(r1.rast, r2.rast) FROM dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;
Output
rid | rid | st_disjoint
-----+-----+-------------
   2 |   1 | t
   2 |   2 | f

ასევე იხილეთ

ST_Intersects