Checks whether a raster object fully covers another raster object or a geometry object in the same spatial reference system (SRS).
Syntax
bool ST_Covers(raster rast1, raster rast2);
bool ST_Covers(raster rast, geometry geom);
bool ST_Covers(geometry geom, raster rast);Parameters
| Parameter | Description |
|---|---|
rast1 | Raster object 1. |
rast2 | Raster object 2. |
rast | The raster object. |
geom | The geometric object. |
Description
The function accepts three input combinations:
Raster vs. raster: Tests whether
rast1coversrast2.Raster vs. geometry: Tests whether
rastcoversgeom, or whethergeomcoversrast, depending on argument order.
Examples
SELECT a.id FROM tbl_a a, tbl_b b WHERE ST_Covers(a.rast, b.rast);
id
----
1
(1 row)该文章对您有帮助吗?