ST_Touches

更新时间:
复制 MD 格式

ST_Touches identifies the spatial relationship between two raster objects, or between a raster object and a geometric object, to determine whether the first specified object touches the second.

Syntax

bool ST_Touches(raster rast1, raster rast2);
bool ST_Touches(raster rast,  geometry geom);
bool ST_Touches(geometry geom, raster rast);

Parameters

ParameterDescription
rast1The first raster object.
rast2The second raster object.
rastA raster object.
geomA geometric object.

Example

The following query returns the IDs of rows in tbl_a whose raster object touches any raster in tbl_b.

SELECT a.id
FROM tbl_a a, tbl_b b
WHERE ST_Touches(a.rast, b.rast);