카테고리:

지리 공간 함수

# ST_DISJOINT¶

Returns TRUE if the two GEOGRAPHY objects or the two GEOMETRY objects are disjoint (i.e. do not share any portion of space). ST_DISJOINT is equivalent to NOT ST_INTERSECTS(expr1, expr2).

참고

This function does not support using a GeometryCollection or FeatureCollection as input values.

참고 항목:

ST_INTERSECTS

## 구문¶

ST_DISJOINT( <geography_expression_1> , <geography_expression_2> )

ST_DISJOINT( <geometry_expression_1> , <geometry_expression_2> )

## 인자¶

geography_expression_1

GEOGRAPHY 오브젝트입니다.

geography_expression_2

GEOGRAPHY 오브젝트입니다.

geometry_expression_1

A GEOMETRY object.

geometry_expression_2

A GEOMETRY object.

BOOLEAN.

## Usage Notes¶

• For GEOMETRY objects, the function reports an error if the two input GEOMETRY objects have different SRIDs.

## 예¶

### GEOGRAPHY Examples¶

다음 예는 ST_DISJOINT 함수를 사용하여 두 지리 공간 오브젝트가 분리되어 있는지 확인합니다.

-- These two polygons are disjoint and do not intersect.
SELECT ST_DISJOINT(
TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'),
TO_GEOGRAPHY('POLYGON((3 3, 5 3, 5 5, 3 5, 3 3))')
);
+---------------------------------------------------------+
| ST_DISJOINT(                                            |
|     TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), |
|     TO_GEOGRAPHY('POLYGON((3 3, 5 3, 5 5, 3 5, 3 3))')  |
|     )                                                   |
|---------------------------------------------------------|
| True                                                    |
+---------------------------------------------------------+
-- These two polygons intersect and are not disjoint.
SELECT ST_DISJOINT(
TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'),
TO_GEOGRAPHY('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))')
);
+---------------------------------------------------------+
| ST_DISJOINT(                                            |
|     TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), |
|     TO_GEOGRAPHY('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))')  |
|     )                                                   |
|---------------------------------------------------------|
| False                                                   |
+---------------------------------------------------------+
맨 위로 이동