Name

& & — 退货 TRUE 如果A的2D边界框与B的2D边界框相交。

Synopsis

boolean &&( geometry A , geometry B );

boolean &&( geography A , geography B );

描述

这个 && 运算符返回 TRUE 如果几何图形A的二维边界框与几何图形B的二维边界框相交。

[Note]

此操作数将使用几何图形上可用的任何索引。

增强:引入了对多面体曲面的2.0.0支持。

可用性:引入了对地理的1.5.0支持。

This method supports Circular Strings and Curves

This function supports Polyhedral surfaces.

示例

SELECT tbl1.column1, tbl2.column1, tbl1.column2 && tbl2.column2 AS overlaps
FROM ( VALUES
        (1, 'LINESTRING(0 0, 3 3)'::geometry),
        (2, 'LINESTRING(0 1, 0 5)'::geometry)) AS tbl1,
( VALUES
        (3, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl2;

 column1 | column1 | overlaps
---------+---------+----------
           1 |       3 | t
           2 |       3 | f
(2 rows)

另请参阅

ST_Intersects, ST_Extent, | & >, & >, & < |, & <, ~ , @