Returns true if every point in the first argument lies inside or on the boundary of the second argument — equivalently, no point of the first argument lies outside the second argument. Both objects must share the same spatial reference system (SRS).
Syntax
bool ST_CoveredBy(raster rast1, raster rast2);
bool ST_CoveredBy(raster rast, geometry geom);
bool ST_CoveredBy(geometry geom, raster rast);Parameters
| Parameter | Description |
|---|---|
rast1 | Raster object 1. |
rast2 | Raster object 2. |
rast | The raster object. |
geom | The geometric object. |
Examples
Filter rows where one raster is spatially covered by another:
SELECT a.id FROM tbl_a a, tbl_b b WHERE ST_CoveredBy(a.rast, b.rast);
id
----
1
(1 row)