&&
功能描述
检查两个图形是否重叠(有一个共同点就为真)。适用于 BOX、POLYGON、CIRCLE。
数据类型
L_OPERAND_TYP(左操作数类型) | R_OPERAND_TYP(右操作数类型) | RET_TYPE(返回类型) |
---|---|---|
BOX | BOX | BOOLEAN |
POLYGON | POLYGON | |
CIRCLE | CIRCLE |
示例
两个方框重叠
sqlSQL> SELECT BOX(POINT('(0,1)'),POINT('(1,0)')) && BOX(POINT('(0,1)'),POINT('(-1,0)')); EXPR1 | ------------------------------------------------------------------------------ T | Total 1 records.
两个圆重叠
sqlSQL> SELECT CIRCLE('<(1,1),2>') && CIRCLE('<(0,0),5>') ; EXPR1 | ------------------------------------------------------------------------------ T | Total 1 records.
两个多边形不重叠
sqlSQL> SELECT POLYGON('(3, 13, 4, 14)') && POLYGON('( 10, 110, 20, 120, 30, 130, 40, 140)'); EXPR1 | ------------------------------------------------------------------------------ F | Total 1 records.