ST_Disjoint — 如果栅格RASTA在空间上不与rastB相交,则返回TRUE。
boolean
ST_Disjoint
(
raster
rastA
, integer
nbandA
, raster
rastB
, integer
nbandB
)
;
boolean
ST_Disjoint
(
raster
rastA
, raster
rastB
)
;
如果栅格RASTA和栅格B不共享任何空间,则它们是不相交的。如果未提供波段编号(或设置为空),则在测试中仅考虑栅格的凸包。如果提供了波段编号,则在测试中只考虑那些有值的像素(不考虑NODATA)。
![]() |
|
此函数不使用任何索引。 |
![]() |
|
要测试栅格和几何图形的空间关系,请在栅格上使用ST_Polygon,例如ST_DISCOCT(ST_Polygon(RASTER),GEOMETRY)。 |
可用性:2.1.0
-- rid = 1 has no bands, hence the NOTICE and the NULL value for st_disjoint
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;
NOTICE: The second raster provided has no bands
rid | rid | st_disjoint
-----+-----+-------------
2 | 1 |
2 | 2 | f
-- this time, without specifying band numbers
SELECT r1.rid, r2.rid, ST_Disjoint(r1.rast, r2.rast) FROM dummy_rast r1 CROSS JOIN dummy_rast r2 WHERE r1.rid = 2;
rid | rid | st_disjoint
-----+-----+-------------
2 | 1 | t
2 | 2 | f