メインコンテンツまでスキップ

ST_TOUCHES

説明

ジオメトリshape1がジオメトリshape2に接触しているかどうかを判定します。(つまり、2つのジオメトリの境界が交差しているが、内部は交差していないかどうか)

Note

Apache Doris 2.1.10以降でサポートされています。

構文

ST_TOUCHES( <shape1>, <shape2> )

パラメータ

パラメータ説明
<shape1>shape2に接触するかどうかを判定するために渡されるジオメトリ
<shape2>shape1に接触するかどうかを判定するために渡されるジオメトリ

戻り値

戻り値1: shape1のグラフがshape2のグラフに接触する

戻り値0: shape1のグラフがshape2のグラフに接触しない

SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)"));
+---------------------------------------------------------------------------------------------------------------------+
| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) |
+---------------------------------------------------------------------------------------------------------------------+
| 1 |
+---------------------------------------------------------------------------------------------------------------------+
SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)"));
+--------------------------------------------------------------------------------------------------------------------+
| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) |
+--------------------------------------------------------------------------------------------------------------------+
| 0 |
+--------------------------------------------------------------------------------------------------------------------+