Introduction: Returns true if raster or geometry on the left side intersects with the raster or geometry on the right side. The convex hull of the raster is considered in the test.
Rules for testing spatial relationship:
Format:
RS_Intersects(raster: Raster, geom: Geometry)
RS_Intersects(geom: Geometry, raster: Raster)
RS_Intersects(raster0: Raster, raster1: Raster)
Return type: Boolean
Since: v1.5.0
SQL Example
SELECT RS_Intersects(RS_MakeEmptyRaster(1, 20, 20, 2, 22, 1), ST_SetSRID(ST_PolygonFromEnvelope(0, 0, 10, 10), 4326)) rast_geom, RS_Intersects(RS_MakeEmptyRaster(1, 20, 20, 2, 22, 1), RS_MakeEmptyRaster(1, 10, 10, 1, 11, 1)) rast_rast
Output:
+---------+---------+ |rast_geom|rast_rast| +---------+---------+ | true| true| +---------+---------+