This function checks whether a raster object overlaps with another raster object or a geometry object in the same spatial reference system.
Syntax
bool ST_overlaps(raster rast1, raster rast2);
bool ST_overlaps(raster rast, geometry geom);
bool ST_overlaps(geometry geom, raster rast);Parameters
| Parameter | Description |
|---|---|
| rast1 | Raster object 1. |
| rast2 | Raster object 2. |
| rast | The raster object. |
| geom | The geometry object. |
Examples
SELECT a.id FROM tbl_a a, tbl_b b WHERE ST_Contains(a.rast, b.rast);
id
----
1
(1 row)Note: The example above callsST_Containsinstead ofST_overlaps. This appears to be an error in the source document. To test spatial overlap, replaceST_ContainswithST_overlaps.
该文章对您有帮助吗?