diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md new file mode 100644 index 0000000000000..502b6fe63f7d6 --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md @@ -0,0 +1,75 @@ +--- +{ + "title": "ST_DISJOINT", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 does not intersect with the geometry shape2. + +## Syntax + +```sql +ST_DISJOINT( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it does not intersect with shape2 | +| `` | The passed geometry used to determine whether it does not intersect with shape1 | + +## Return Value + +Return 1: shape1 The graph does not intersect with the graph shape2 + +Return 0: shape1 The graph intersects with the graph shape2 + + +## Examples + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++------------------------------------------------------------------------------------+ +| 0 | ++------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md new file mode 100644 index 0000000000000..033c028431fb4 --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md @@ -0,0 +1,75 @@ +--- +{ + "title": "ST_INTERSECTS", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 intersects with the geometry shape2. + +## Syntax + +```sql +ST_INTERSECTS( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it intersects with shape2 | +| `` | The passed geometry used to determine whether it intersects with shape1 | + +## Return Value + +Return 1: shape1 The graph intersects with the graph shape2 + +Return 0: shape1 The graph does not intersect with the graph shape2 + + +## Examples + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++----------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++----------------------------------------------------------------------------------------+ +| 0 | ++----------------------------------------------------------------------------------------+ +``` diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md new file mode 100644 index 0000000000000..a95eb268d066c --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md @@ -0,0 +1,75 @@ +--- +{ + "title": "ST_TOUCHES", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 touches the geometry shape2. (i.e., whether the boundaries of the two geometries intersect but their interiors do not) + +## Syntax + +```sql +ST_TOUCHES( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it touches shape2 | +| `` | The passed geometry used to determine whether it touches shape1 | + +## Return Value + +Return 1: shape1 The graph touches the graph shape2 + +Return 0: shape1 The graph does not touch the graph shape2 + + +## Examples + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")); +``` + +```text ++---------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) | ++---------------------------------------------------------------------------------------------------------------------+ +| 1 | ++---------------------------------------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")); +``` + +```text ++--------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) | ++--------------------------------------------------------------------------------------------------------------------+ +| 0 | ++--------------------------------------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md new file mode 100644 index 0000000000000..9c4445366612c --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md @@ -0,0 +1,75 @@ +--- +{ + "title": "ST_DISJOINT", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断两个几何图形是否完全不相交(即没有任何公共点)。若两图形的边界、内部均无交集,则返回 `1`,否则返回 `0`。 + +## 语法 + +```sql +ST_DISJOINT( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 不相交 | +| `` | 传入的几何图形,用于判断是否与 shape1 不相交 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 不相交 + +返回 0: shape1 图形与图形 shape2 相交 + + +## 举例 + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++------------------------------------------------------------------------------------+ +| 0 | ++------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md new file mode 100644 index 0000000000000..019240d65750b --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md @@ -0,0 +1,75 @@ +--- +{ + "title": "ST_INTERSECTS", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断几何图形 shape1 是否与几何图形 shape2 相交 + +## 语法 + +```sql +ST_INTERSECTS( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 相交 | +| `` | 传入的几何图形,用于判断是否与 shape1 相交 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 相交 + +返回 0: shape1 图形与图形 shape2 不相交 + + +## 举例 + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++----------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++----------------------------------------------------------------------------------------+ +| 0 | ++----------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md new file mode 100644 index 0000000000000..ffd9da796476c --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md @@ -0,0 +1,75 @@ +--- +{ + "title": "ST_TOUCHES", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断几何图形 shape1 是否与几何图形 shape2 相接触(即两个几何图形的边界是否相交,但内部不相交) + +## 语法 + +```sql +ST_TOUCHES( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 相接触 | +| `` | 传入的几何图形,用于判断是否与 shape1 相接触 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 相接触 + +返回 0: shape1 图形与图形 shape2 不接触 + + +## 举例 + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")); +``` + +```text ++---------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) | ++---------------------------------------------------------------------------------------------------------------------+ +| 1 | ++---------------------------------------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineFromText("LINESTRING (5 5, 15 5)")); +``` + +```text ++--------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) | ++--------------------------------------------------------------------------------------------------------------------+ +| 0 | ++--------------------------------------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md new file mode 100644 index 0000000000000..df594b3a762e3 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_DISJOINT", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断两个几何图形是否完全不相交(即没有任何公共点)。若两图形的边界、内部均无交集,则返回 `1`,否则返回 `0`。 + +:::info 备注 +从 Apache Doris 2.1.10 开始支持该函数 +::: + +## 语法 + +```sql +ST_DISJOINT( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 不相交 | +| `` | 传入的几何图形,用于判断是否与 shape1 不相交 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 不相交 + +返回 0: shape1 图形与图形 shape2 相交 + + +## 举例 + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++------------------------------------------------------------------------------------+ +| 0 | ++------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md new file mode 100644 index 0000000000000..9dca810416612 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_INTERSECTS", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断几何图形 shape1 是否与几何图形 shape2 相交 + +:::info 备注 +从 Apache Doris 2.1.10 开始支持该函数 +::: + +## 语法 + +```sql +ST_INTERSECTS( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 相交 | +| `` | 传入的几何图形,用于判断是否与 shape1 相交 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 相交 + +返回 0: shape1 图形与图形 shape2 不相交 + + +## 举例 + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++----------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++----------------------------------------------------------------------------------------+ +| 0 | ++----------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md new file mode 100644 index 0000000000000..0eec406c31e1e --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_TOUCHES", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断几何图形 shape1 是否与几何图形 shape2 相接触(即两个几何图形的边界是否相交,但内部不相交) + +:::info 备注 +从 Apache Doris 2.1.10 开始支持该函数 +::: + +## 语法 + +```sql +ST_TOUCHES( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 相接触 | +| `` | 传入的几何图形,用于判断是否与 shape1 相接触 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 相接触 + +返回 0: shape1 图形与图形 shape2 不接触 + + +## 举例 + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")); +``` + +```text ++---------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) | ++---------------------------------------------------------------------------------------------------------------------+ +| 1 | ++---------------------------------------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineFromText("LINESTRING (5 5, 15 5)")); +``` + +```text ++--------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) | ++--------------------------------------------------------------------------------------------------------------------+ +| 0 | ++--------------------------------------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md new file mode 100644 index 0000000000000..11b2d5519ea4c --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_DISJOINT", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断两个几何图形是否完全不相交(即没有任何公共点)。若两图形的边界、内部均无交集,则返回 `1`,否则返回 `0`。 + +:::info 备注 +从 Apache Doris 3.0.6 开始支持该函数 +::: + +## 语法 + +```sql +ST_DISJOINT( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 不相交 | +| `` | 传入的几何图形,用于判断是否与 shape1 不相交 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 不相交 + +返回 0: shape1 图形与图形 shape2 相交 + + +## 举例 + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++------------------------------------------------------------------------------------+ +| 0 | ++------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md new file mode 100644 index 0000000000000..96b7419b0e608 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_INTERSECTS", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断几何图形 shape1 是否与几何图形 shape2 相交 + +:::info 备注 +从 Apache Doris 3.0.6 开始支持该函数 +::: + +## 语法 + +```sql +ST_INTERSECTS( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 相交 | +| `` | 传入的几何图形,用于判断是否与 shape1 相交 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 相交 + +返回 0: shape1 图形与图形 shape2 不相交 + + +## 举例 + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++----------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++----------------------------------------------------------------------------------------+ +| 0 | ++----------------------------------------------------------------------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md new file mode 100644 index 0000000000000..fbf6a1599db98 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_TOUCHES", + "language": "zh-CN" +} +--- + + + +## 描述 + +判断几何图形 shape1 是否与几何图形 shape2 相接触(即两个几何图形的边界是否相交,但内部不相交) + +:::info 备注 +从 Apache Doris 3.0.6 开始支持该函数 +::: + +## 语法 + +```sql +ST_TOUCHES( , ) +``` + +## 参数 + +| 参数 | 说明 | +|----------|------------------------| +| `` | 传入的几何图形,用于判断是否与 shape2 相接触 | +| `` | 传入的几何图形,用于判断是否与 shape1 相接触 | + +## 返回值 + +返回 1: shape1 图形与图形 shape2 相接触 + +返回 0: shape1 图形与图形 shape2 不接触 + + +## 举例 + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")); +``` + +```text ++---------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) | ++---------------------------------------------------------------------------------------------------------------------+ +| 1 | ++---------------------------------------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineFromText("LINESTRING (5 5, 15 5)")); +``` + +```text ++--------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) | ++--------------------------------------------------------------------------------------------------------------------+ +| 0 | ++--------------------------------------------------------------------------------------------------------------------+ +``` diff --git a/sidebars.json b/sidebars.json index eccad63ecec89..3bbf62ecc7103 100644 --- a/sidebars.json +++ b/sidebars.json @@ -1144,6 +1144,9 @@ "sql-manual/sql-functions/scalar-functions/spatial-functions/st-polygon", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-astext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-contains", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-geometryfromtext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-linefromtext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-asbinary", diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md b/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md new file mode 100644 index 0000000000000..38096d420e03d --- /dev/null +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_DISJOINT", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 does not intersect with the geometry shape2. + +:::info Note +Supported since Apache Doris 2.1.10. +::: + +## Syntax + +```sql +ST_DISJOINT( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it does not intersect with shape2 | +| `` | The passed geometry used to determine whether it does not intersect with shape1 | + +## Return Value + +Return 1: shape1 The graph does not intersect with the graph shape2 + +Return 0: shape1 The graph intersects with the graph shape2 + + +## Examples + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++------------------------------------------------------------------------------------+ +| 0 | ++------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md b/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md new file mode 100644 index 0000000000000..81ccb143c0a65 --- /dev/null +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_INTERSECTS", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 intersects with the geometry shape2. + +:::info Note +Supported since Apache Doris 2.1.10. +::: + +## Syntax + +```sql +ST_INTERSECTS( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it intersects with shape2 | +| `` | The passed geometry used to determine whether it intersects with shape1 | + +## Return Value + +Return 1: shape1 The graph intersects with the graph shape2 + +Return 0: shape1 The graph does not intersect with the graph shape2 + + +## Examples + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++----------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++----------------------------------------------------------------------------------------+ +| 0 | ++----------------------------------------------------------------------------------------+ +``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md b/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md new file mode 100644 index 0000000000000..412a68caf5220 --- /dev/null +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_TOUCHES", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 touches the geometry shape2. (i.e., whether the boundaries of the two geometries intersect but their interiors do not) + +:::info Note +Supported since Apache Doris 2.1.10. +::: + +## Syntax + +```sql +ST_TOUCHES( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it touches shape2 | +| `` | The passed geometry used to determine whether it touches shape1 | + +## Return Value + +Return 1: shape1 The graph touches the graph shape2 + +Return 0: shape1 The graph does not touch the graph shape2 + + +## Examples + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")); +``` + +```text ++---------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) | ++---------------------------------------------------------------------------------------------------------------------+ +| 1 | ++---------------------------------------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")); +``` + +```text ++--------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) | ++--------------------------------------------------------------------------------------------------------------------+ +| 0 | ++--------------------------------------------------------------------------------------------------------------------+ +``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md new file mode 100644 index 0000000000000..15be06ca969a2 --- /dev/null +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_DISJOINT", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 does not intersect with the geometry shape2. + +:::info Note +Supported since Apache Doris 3.0.6. +::: + +## Syntax + +```sql +ST_DISJOINT( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it does not intersect with shape2 | +| `` | The passed geometry used to determine whether it does not intersect with shape1 | + +## Return Value + +Return 1: shape1 The graph does not intersect with the graph shape2 + +Return 0: shape1 The graph intersects with the graph shape2 + + +## Examples + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++------------------------------------------------------------------------------------+ +| 0 | ++------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Disjoint(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md new file mode 100644 index 0000000000000..33658cd06428d --- /dev/null +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_INTERSECTS", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 intersects with the geometry shape2. + +:::info Note +Supported since Apache Doris 3.0.6. +::: + +## Syntax + +```sql +ST_INTERSECTS( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it intersects with shape2 | +| `` | The passed geometry used to determine whether it intersects with shape1 | + +## Return Value + +Return 1: shape1 The graph intersects with the graph shape2 + +Return 0: shape1 The graph does not intersect with the graph shape2 + + +## Examples + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)); +``` + +```text ++--------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(5, 5)) | ++--------------------------------------------------------------------------------------+ +| 1 | ++--------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)); +``` + +```text ++----------------------------------------------------------------------------------------+ +| ST_Intersects(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_Point(50, 50)) | ++----------------------------------------------------------------------------------------+ +| 0 | ++----------------------------------------------------------------------------------------+ +``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md new file mode 100644 index 0000000000000..af5abbaf517a2 --- /dev/null +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches.md @@ -0,0 +1,79 @@ +--- +{ + "title": "ST_TOUCHES", + "language": "en" +} +--- + + + +## Description + +Determines whether the geometry shape1 touches the geometry shape2. (i.e., whether the boundaries of the two geometries intersect but their interiors do not) + +:::info Note +Supported since Apache Doris 3.0.6. +::: + +## Syntax + +```sql +ST_TOUCHES( , ) +``` + +## Parameters + +| Parameters | Instructions | +|----------|------------------------| +| `` | The passed geometry used to determine whether it touches shape2 | +| `` | The passed geometry used to determine whether it touches shape1 | + +## Return Value + +Return 1: shape1 The graph touches the graph shape2 + +Return 0: shape1 The graph does not touch the graph shape2 + + +## Examples + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")); +``` + +```text ++---------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (10 5, 15 5)")) | ++---------------------------------------------------------------------------------------------------------------------+ +| 1 | ++---------------------------------------------------------------------------------------------------------------------+ +``` + +```sql +SELECT ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")); +``` + +```text ++--------------------------------------------------------------------------------------------------------------------+ +| ST_Touches(ST_Polygon("POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))"), ST_LineStringFromText("LINESTRING (5 5, 15 5)")) | ++--------------------------------------------------------------------------------------------------------------------+ +| 0 | ++--------------------------------------------------------------------------------------------------------------------+ +``` diff --git a/versioned_sidebars/version-2.1-sidebars.json b/versioned_sidebars/version-2.1-sidebars.json index d755fc985de12..15e6cb06f832f 100644 --- a/versioned_sidebars/version-2.1-sidebars.json +++ b/versioned_sidebars/version-2.1-sidebars.json @@ -1147,6 +1147,9 @@ "sql-manual/sql-functions/scalar-functions/spatial-functions/st-polygon", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-astext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-contains", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-geometryfromtext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-linefromtext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-asbinary", diff --git a/versioned_sidebars/version-3.0-sidebars.json b/versioned_sidebars/version-3.0-sidebars.json index 099264ac38490..954380dfde76f 100644 --- a/versioned_sidebars/version-3.0-sidebars.json +++ b/versioned_sidebars/version-3.0-sidebars.json @@ -1197,6 +1197,9 @@ "sql-manual/sql-functions/scalar-functions/spatial-functions/st-polygon", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-astext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-contains", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-intersects", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-disjoint", + "sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-geometryfromtext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-linefromtext", "sql-manual/sql-functions/scalar-functions/spatial-functions/st-asbinary",