diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax.md new file mode 100644 index 0000000000000..25b7d1c372b17 --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_XMAX", + "language": "en", + "description": "Returns the maximum X (longitude) coordinate of the bounding box of a geometry." +} +--- + +## Description + +Returns the maximum X (longitude) coordinate of the bounding box of a geometry. + +## Syntax + +```sql +ST_XMAX( ) +``` + +## Parameters + +| Parameter | Description | +|------|----------| +| `` | The geometry object from which to extract the maximum X coordinate of the bounding box. | + +## Return Value + +The the maximum X coordinate of the bounding box, of type double-precision floating-point number (Double). + +- Returns the maximum X coordinate of the bounding box if the input is a valid geometry object. +- Returns NULL if the input is NULL or an invalid geometry (e.g., a non-geometry string). + +## Example + +Extract the maximum X coordinate of the bounding box of a point + +```sql +SELECT ST_XMax(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_XMax(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +Extract the maximum X coordinate of the bounding box of a linestring + +```sql +SELECT ST_XMax(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_XMax(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +Extract the maximum X coordinate of the bounding box of a polygon + +```sql +SELECT ST_XMax(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_XMax(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +Input is an invalid geometry + +```sql +SELECT ST_XMax('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_XMax('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +Input is NULL + +```sql +SELECT ST_XMax(NULL); +``` + +```text ++-------------------------+ +| ST_XMax(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin.md new file mode 100644 index 0000000000000..d83d4a1ab570d --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_XMIN", + "language": "en", + "description": "Returns the minimum X (longitude) coordinate of the bounding box of a geometry." +} +--- + +## Description + +Returns the minimum X (longitude) coordinate of the bounding box of a geometry. + +## Syntax + +```sql +ST_XMIN( ) +``` + +## Parameters + +| Parameter | Description | +|------|----------| +| `` | The geometry object from which to extract the minimum X coordinate of the bounding box. | + +## Return Value + +The the minimum X coordinate of the bounding box, of type double-precision floating-point number (Double). + +- Returns the minimum X coordinate of the bounding box if the input is a valid geometry object. +- Returns NULL if the input is NULL or an invalid geometry (e.g., a non-geometry string). + +## Example + +Extract the minimum X coordinate of the bounding box of a point + +```sql +SELECT ST_XMin(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_XMin(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +Extract the minimum X coordinate of the bounding box of a linestring + +```sql +SELECT ST_XMin(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_XMin(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +Extract the minimum X coordinate of the bounding box of a polygon + +```sql +SELECT ST_XMin(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_XMin(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +Input is an invalid geometry + +```sql +SELECT ST_XMin('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_XMin('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +Input is NULL + +```sql +SELECT ST_XMin(NULL); +``` + +```text ++-------------------------+ +| ST_XMin(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax.md new file mode 100644 index 0000000000000..f9d94062e76ad --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_YMAX", + "language": "en", + "description": "Returns the maximum Y (latitude) coordinate of the bounding box of a geometry." +} +--- + +## Description + +Returns the maximum Y (latitude) coordinate of the bounding box of a geometry. + +## Syntax + +```sql +ST_YMAX( ) +``` + +## Parameters + +| Parameter | Description | +|------|----------| +| `` | The geometry object from which to extract the maximum Y coordinate of the bounding box. | + +## Return Value + +The the maximum Y coordinate of the bounding box, of type double-precision floating-point number (Double). + +- Returns the maximum Y coordinate of the bounding box if the input is a valid geometry object. +- Returns NULL if the input is NULL or an invalid geometry (e.g., a non-geometry string). + +## Example + +Extract the maximum Y coordinate of the bounding box of a point + +```sql +SELECT ST_YMax(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_YMax(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +Extract the maximum Y coordinate of the bounding box of a linestring + +```sql +SELECT ST_YMax(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_YMax(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +Extract the maximum Y coordinate of the bounding box of a polygon + +```sql +SELECT ST_YMax(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_YMax(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +Input is an invalid geometry + +```sql +SELECT ST_YMax('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_YMax('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +Input is NULL + +```sql +SELECT ST_YMax(NULL); +``` + +```text ++-------------------------+ +| ST_YMax(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin.md b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin.md new file mode 100644 index 0000000000000..cd77f2aa97ef5 --- /dev/null +++ b/docs/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_YMIN", + "language": "en", + "description": "Returns the minimum Y (latitude) coordinate of the bounding box of a geometry." +} +--- + +## Description + +Returns the minimum Y (latitude) coordinate of the bounding box of a geometry. + +## Syntax + +```sql +ST_YMIN( ) +``` + +## Parameters + +| Parameter | Description | +|------|----------| +| `` | The geometry object from which to extract the minimum Y coordinate of the bounding box. | + +## Return Value + +The the minimum Y coordinate of the bounding box, of type double-precision floating-point number (Double). + +- Returns the minimum Y coordinate of the bounding box if the input is a valid geometry object. +- Returns NULL if the input is NULL or an invalid geometry (e.g., a non-geometry string). + +## Example + +Extract the minimum Y coordinate of the bounding box of a point + +```sql +SELECT ST_YMin(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_YMin(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +Extract the minimum Y coordinate of the bounding box of a linestring + +```sql +SELECT ST_YMin(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_YMin(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +Extract the minimum Y coordinate of the bounding box of a polygon + +```sql +SELECT ST_YMin(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_YMin(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +Input is an invalid geometry + +```sql +SELECT ST_YMin('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_YMin('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +Input is NULL + +```sql +SELECT ST_YMin(NULL); +``` + +```text ++-------------------------+ +| ST_YMin(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax.md new file mode 100644 index 0000000000000..1513d97b1ece5 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_XMAX", + "language": "zh-CN", + "description": "返回几何体包围盒的最大 X(经度)坐标。" +} +--- + +## 描述 + +返回几何体包围盒的最大 X(经度)坐标。 + +## 语法 + +```sql +ST_XMAX( ) +``` + +## 参数 + +| 参数 | 说明 | +|------|----------| +| `` | 待提取包围盒最大 X 坐标的几何对象。 | + +## 返回值 + +包围盒的最大 X 坐标,类型为双浮点精度小数 Double。 + +- 若输入为有效的几何对象,返回 包围盒的最大 X 坐标。 +- 若输入为 NULL 或无效几何(如非几何字符串),返回 NULL。 + +## 举例 + +提取点的包围盒的最大 X 坐标 + +```sql +SELECT ST_XMax(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_XMax(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +提取线的包围盒的最大 X 坐标 + +```sql +SELECT ST_XMax(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_XMax(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +提取面的包围盒的最大 X 坐标 + +```sql +SELECT ST_XMax(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_XMax(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +输入为无效几何 + +```sql +SELECT ST_XMax('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_XMax('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +输入为 NULL + +```sql +SELECT ST_XMax(NULL); +``` + +```text ++-------------------------+ +| ST_XMax(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin.md new file mode 100644 index 0000000000000..50672743b043f --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_XMIN", + "language": "zh-CN", + "description": "返回几何体包围盒的最小 X(经度)坐标。" +} +--- + +## 描述 + +返回几何体包围盒的最小 X(经度)坐标。 + +## 语法 + +```sql +ST_XMIN( ) +``` + +## 参数 + +| 参数 | 说明 | +|------|----------| +| `` | 待提取包围盒最小 X 坐标的几何对象。 | + +## 返回值 + +包围盒的最小 X 坐标,类型为双浮点精度小数 Double。 + +- 若输入为有效的几何对象,返回 包围盒的最小 X 坐标。 +- 若输入为 NULL 或无效几何(如非几何字符串),返回 NULL。 + +## 举例 + +提取点的包围盒的最小 X 坐标 + +```sql +SELECT ST_XMin(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_XMin(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +提取线的包围盒的最小 X 坐标 + +```sql +SELECT ST_XMin(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_XMin(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +提取面的包围盒的最小 X 坐标 + +```sql +SELECT ST_XMin(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_XMin(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +输入为无效几何 + +```sql +SELECT ST_XMin('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_XMin('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +输入为 NULL + +```sql +SELECT ST_XMin(NULL); +``` + +```text ++-------------------------+ +| ST_XMin(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax.md new file mode 100644 index 0000000000000..131216ed38c5b --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_YMAX", + "language": "zh-CN", + "description": "返回几何体包围盒的最大 Y(纬度)坐标。" +} +--- + +## 描述 + +返回几何体包围盒的最大 Y(纬度)坐标。 + +## 语法 + +```sql +ST_YMAX( ) +``` + +## 参数 + +| 参数 | 说明 | +|------|----------| +| `` | 待提取包围盒最大 Y 坐标的几何对象。 | + +## 返回值 + +包围盒的最大 Y 坐标,类型为双浮点精度小数 Double。 + +- 若输入为有效的几何对象,返回 包围盒的最大 Y 坐标。 +- 若输入为 NULL 或无效几何(如非几何字符串),返回 NULL。 + +## 举例 + +提取点的包围盒的最大 Y 坐标 + +```sql +SELECT ST_YMax(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_YMax(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +提取线的包围盒的最大 Y 坐标 + +```sql +SELECT ST_YMax(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_YMax(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +提取面的包围盒的最大 Y 坐标 + +```sql +SELECT ST_YMax(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_YMax(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +输入为无效几何 + +```sql +SELECT ST_YMax('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_YMax('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +输入为 NULL + +```sql +SELECT ST_YMax(NULL); +``` + +```text ++-------------------------+ +| ST_YMax(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin.md new file mode 100644 index 0000000000000..50f3d801a7697 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin.md @@ -0,0 +1,102 @@ +--- +{ + "title": "ST_YMIN", + "language": "zh-CN", + "description": "返回几何体包围盒的最小 Y(纬度)坐标。" +} +--- + +## 描述 + +返回几何体包围盒的最小 Y(纬度)坐标。 + +## 语法 + +```sql +ST_YMIN( ) +``` + +## 参数 + +| 参数 | 说明 | +|------|----------| +| `` | 待提取包围盒最小 Y 坐标的几何对象。 | + +## 返回值 + +包围盒的最小 Y 坐标,类型为双浮点精度小数 Double。 + +- 若输入为有效的几何对象,返回 包围盒的最小 Y 坐标。 +- 若输入为 NULL 或无效几何(如非几何字符串),返回 NULL。 + +## 举例 + +提取点的包围盒的最小 Y 坐标 + +```sql +SELECT ST_YMin(ST_Point(24.7, 56.7)); +``` + +```text ++---------------------------------+ +| ST_YMin(st_point(24.7, 56.7)) | ++---------------------------------+ +| 24.7 | ++---------------------------------+ +``` + +提取线的包围盒的最小 Y 坐标 + +```sql +SELECT ST_YMin(ST_LineStringFromText('LINESTRING (0 0, 4 4)')); +``` + +```text ++---------------------------------------------------------+ +| ST_YMin(st_linestringfromtext('LINESTRING (0 0, 4 4)')) | ++---------------------------------------------------------+ +| 4 | ++---------------------------------------------------------+ +``` + +提取面的包围盒的最小 Y 坐标 + +```sql +SELECT ST_YMin(ST_Polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')); +``` + +```text ++------------------------------------------------------------------+ +| ST_YMin(st_polygon('POLYGON ((0 0, 4 0, 4 3, 0 3, 0 0))')) | ++------------------------------------------------------------------+ +| 4 | ++------------------------------------------------------------------+ +``` + +输入为无效几何 + +```sql +SELECT ST_YMin('not a geometry'); +``` + +```text ++------------------------------------------+ +| ST_YMin('not a geometry') | ++------------------------------------------+ +| NULL | ++------------------------------------------+ +``` + +输入为 NULL + +```sql +SELECT ST_YMin(NULL); +``` + +```text ++-------------------------+ +| ST_YMin(null) | ++-------------------------+ +| NULL | ++-------------------------+ +``` diff --git a/sidebars.ts b/sidebars.ts index 0405755dc0107..b3fae8223df18 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -1696,7 +1696,11 @@ const sidebars: SidebarsConfig = { 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-polygon', 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-touches', 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-x', + 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmax', + 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-xmin', 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-y', + 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymax', + 'sql-manual/sql-functions/scalar-functions/spatial-functions/st-ymin', ], }, {