名称

&&& — 如果 A 的 n 维边界框与 B 的 n 维边界框相交,则返回 TRUE

概要

boolean &&&( geometry A , geometry B );

描述

如果几何 A 的 n 维边界框与几何 B 的 n 维边界框相交,则 &&& 运算符返回 TRUE

[Note]

此操作数将利用几何体上可能存在的任何索引。

可用性:2.0.0

此方法支持圆弧字符串和曲线。

此函数支持多面体曲面。

此函数支持三角形和三角不规则网络曲面 (TIN)。

此函数支持 3d 并且不会删除 z 索引。

示例:3D 线串

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

 column1 | column1 | overlaps_3d | overlaps_2d
---------+---------+-------------+-------------
       1 |       3 | t           | t
       2 |       3 | f           | t

示例:3M 线串

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

 column1 | column1 | overlaps_3zm | overlaps_2d
---------+---------+-------------+-------------
       1 |       3 | t           | t
       2 |       3 | f           | t

另请参阅

&&