ST_Disjoint — 如果網格 rastA 與 rastB 在空間上不相交,則返回 true。
boolean ST_Disjoint(
raster rastA , integer nbandA , raster rastB , integer nbandB )
;
boolean ST_Disjoint(
raster rastA , raster rastB )
;
如果網格 rastA 和 rastB 沒有共享任何空間,則它們是不相交的。如果未提供頻帶號(或設置為 NULL),則在測試中僅考慮網格的凸包。如果提供了頻帶號,則在測試中僅考慮具有值(非 NODATA)的像素。
![]() |
|
此函數不使用任何索引。 |
![]() |
|
要測試網格和幾何圖形的空間關係,請對網格使用 ST_Polygon,例如 ST_Disjoint(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