### 12.17.1 空间函数参考

[](<>)

下表列出了每个空间功能并提供了每个功能的简短描述。

[](<>)

**表 12.21 空间函数**

| 姓名 | 描述 | 介绍 |
| --- | --- | --- |
| [`几何集合（）`](gis-mysql-specific-functions.html#function_geomcollection) | 从几何构造几何集合 |  |
| [`几何集合（）`](gis-mysql-specific-functions.html#function_geometrycollection) | 从几何构造几何集合 |  |
| [`线串（）`](gis-mysql-specific-functions.html#function_linestring) | 从点值构造 LineString |  |
| [`MBRContains()`](spatial-relation-functions-mbr.html#function_mbrcontains) | 一个几何的 MBR 是否包含另一个几何的 MBR |  |
| [`MBRCoveredBy()`](spatial-relation-functions-mbr.html#function_mbrcoveredby) | 一个 MBR 是否被另一个覆盖 |  |
| [`MBRCovers()`](spatial-relation-functions-mbr.html#function_mbrcovers) | 一个 MBR 是否覆盖另一个 |  |
| [`MBR不相交（）`](spatial-relation-functions-mbr.html#function_mbrdisjoint) | 两个几何的 MBR 是否不相交 |  |
| [`MBREquals()`](spatial-relation-functions-mbr.html#function_mbrequals) | 两个几何的 MBR 是否相等 |  |
| [`MBRIntersects()`](spatial-relation-functions-mbr.html#function_mbrintersects) | 两个几何的 MBR 是否相交 |  |
| [`MBROverlaps()`](spatial-relation-functions-mbr.html#function_mbroverlaps) | 两个几何的 MBR 是否重叠 |  |
| [`MBRTouches()`](spatial-relation-functions-mbr.html#function_mbrtouches) | 两个几何的 MBR 是否接触 |  |
| [`MBRWithin()`](spatial-relation-functions-mbr.html#function_mbrwithin) | 一个几何的 MBR 是否在另一个几何的 MBR 内 |  |
| [`多行字符串（）`](gis-mysql-specific-functions.html#function_multilinestring) | 从 LineString 值构造 MultiLineString |  |
| [`多点（）`](gis-mysql-specific-functions.html#function_multipoint) | 从点值构造多点 |  |
| [`多多边形（）`](gis-mysql-specific-functions.html#function_multipolygon) | 从 Polygon 值构造 MultiPolygon |  |
| [`观点（）`](gis-mysql-specific-functions.html#function_point) | 从坐标构造点 |  |
| [`多边形（）`](gis-mysql-specific-functions.html#function_polygon) | 从 LineString 参数构造多边形 |  |
| [`ST_Area()`](gis-polygon-property-functions.html#function_st-area) | 返回多边形或多多边形区域 |  |
| [`ST_AsBinary()`, `ST_AsWKB()`](gis-format-conversion-functions.html#function_st-asbinary) | 从内部几何格式转换为 WKB |  |
| [`ST_AsGeoJSON()`](spatial-geojson-functions.html#function_st-asgeojson) | 从几何生成 GeoJSON 对象 |  |
| [`ST_AsText()`, `ST_AsWKT()`](gis-format-conversion-functions.html#function_st-astext) | 从内部几何格式转换为 WKT |  |
| [`ST_Buffer()`](spatial-operator-functions.html#function_st-buffer) | 返回几何给定距离内的点的几何 |  |
| [`ST_Buffer_Strategy()`](spatial-operator-functions.html#function_st-buffer-strategy) | 为 ST 生成策略选项\_缓冲（） |  |
| [`ST_Centroid()`](gis-polygon-property-functions.html#function_st-centroid) | 将质心作为一个点返回 |  |
| [`ST_Collect()`](spatial-aggregate-functions.html#function_st-collect) | 将空间值聚合到集合中 | 8.0.24 |
| [`ST_Contains()`](spatial-relation-functions-object-shapes.html#function_st-contains) | 一个几何图形是否包含另一个几何图形 |  |
| [`ST_ConvexHull()`](spatial-operator-functions.html#function_st-convexhull) | 返回几何的凸包 |  |
| [`ST_Crosses()`](spatial-relation-functions-object-shapes.html#function_st-crosses) | 一个几何图形是否与另一个几何图形相交 |  |
| [`ST_Difference()`](spatial-operator-functions.html#function_st-difference) | 两个几何形状的返回点集差异 |  |
| [`ST_Dimension()`](gis-general-property-functions.html#function_st-dimension) | 几何尺寸 |  |
| [`ST_Disjoint()`](spatial-relation-functions-object-shapes.html#function_st-disjoint) | 一个几何图形是否与另一个几何图形脱节 |  |
| [`ST_Distance()`](spatial-relation-functions-object-shapes.html#function_st-distance) | 一个几何体与另一个几何体的距离 |  |
| [`ST_Distance_Sphere()`](spatial-convenience-functions.html#function_st-distance-sphere) | 地球上两个几何图形之间的最小距离 |  |
| [`ST_EndPoint()`](gis-linestring-property-functions.html#function_st-endpoint) | 线串的终点 |  |
| [`ST_信封（）`](gis-general-property-functions.html#function_st-envelope) | 返回几何的 MBR |  |
| [`ST_Equals()`](spatial-relation-functions-object-shapes.html#function_st-equals) | 一个几何图形是否等于另一个几何图形 |  |
| [`ST_ExteriorRing()`](gis-polygon-property-functions.html#function_st-exteriorring) | 返回 Polygon 的外环 |  |
| [`ST_FrechetDistance()`](spatial-relation-functions-object-shapes.html#function_st-frechetdistance) | 一个几何体与另一个几何体的离散 Fréchet 距离 | 8.0.23 |
| [`ST_GeoHash()`](spatial-geohash-functions.html#function_st-geohash) | 产生一个geohash值 |  |
| [`ST_GeomCollFromText()`, `ST_GeometryCollectionFromText()`, `ST_GeomCollFromTxt()`](gis-wkt-functions.html#function_st-geomcollfromtext) | 从 WKT 返回几何集合 |  |
| [`ST_GeomCollFromWKB()`, `ST_GeometryCollectionFromWKB()`](gis-wkb-functions.html#function_st-geomcollfromwkb) | 从 WKB 返回几何集合 |  |
| [`ST_GeometryN()`](gis-geometrycollection-property-functions.html#function_st-geometryn) | 从几何集合中返回第 N 个几何 |  |
| [`ST_GeometryType()`](gis-general-property-functions.html#function_st-geometrytype) | 返回几何类型的名称 |  |
| [`ST_GeomFromGeoJSON()`](spatial-geojson-functions.html#function_st-geomfromgeojson) | 从 GeoJSON 对象生成几何 |  |
| [`ST_GeomFromText()`, `ST_GeometryFromText()`](gis-wkt-functions.html#function_st-geomfromtext) | 从 WKT 返回几何图形 |  |
| [`ST_GeomFromWKB()`, `ST_GeometryFromWKB()`](gis-wkb-functions.html#function_st-geomfromwkb) | 从 WKB 返回几何图形 |  |
| [`ST_HausdorffDistance()`](spatial-relation-functions-object-shapes.html#function_st-hausdorffdistance) | 一个几何体与另一个几何体的离散豪斯多夫距离 | 8.0.23 |
| [`ST_InteriorRingN()`](gis-polygon-property-functions.html#function_st-interiorringn) | 返回 Polygon 的第 N 个内环 |  |
| [`ST_Intersection()`](spatial-operator-functions.html#function_st-intersection) | 返回点集两个几何的交集 |  |
| [`ST_Intersects()`](spatial-relation-functions-object-shapes.html#function_st-intersects) | 一个几何图形是否与另一个几何图形相交 |  |
| [`ST_IsClosed()`](gis-linestring-property-functions.html#function_st-isclosed) | 几何是否封闭且简单 |  |
| [`ST_IsEmpty()`](gis-general-property-functions.html#function_st-isempty) | 几何是否为空 |  |
| [`ST_IsSimple()`](gis-general-property-functions.html#function_st-issimple) | 几何是否简单 |  |
| [`ST_IsValid()`](spatial-convenience-functions.html#function_st-isvalid) | 几何是否有效 |  |
| [`ST_LatFromGeoHash()`](spatial-geohash-functions.html#function_st-latfromgeohash) | 从 geohash 值返回纬度 |  |
| [`ST_Latitude()`](gis-point-property-functions.html#function_st-latitude) | 返回Point的纬度 | 8.0.12 |
| [`ST_长度（）`](gis-linestring-property-functions.html#function_st-length) | LineString 的返回长度 |  |
| [`ST_LineFromText()`, `ST_LineStringFromText()`](gis-wkt-functions.html#function_st-linefromtext) | 从 WKT 构造 LineString |  |
| [`ST_LineFromWKB()`, `ST_LineStringFromWKB()`](gis-wkb-functions.html#function_st-linefromwkb) | 从 WKB 构造 LineString |  |
| [`ST_LineInterpolatePoint()`](spatial-operator-functions.html#function_st-lineinterpolatepoint) | 沿 LineString 的给定百分比的点 | 8.0.24 |
| [`ST_LineInterpolatePoints()`](spatial-operator-functions.html#function_st-lineinterpolatepoints) | 沿 LineString 的给定百分比的点 | 8.0.24 |
| [`ST_LongFromGeoHash()`](spatial-geohash-functions.html#function_st-longfromgeohash) | 从 geohash 值返回经度 |  |
| [`ST_经度（）`](gis-point-property-functions.html#function_st-longitude) | 返回Point的经度 | 8.0.12 |
| [`ST_MakeEnvelope()`](spatial-convenience-functions.html#function_st-makeenvelope) | 围绕两个点的矩形 |  |
| [`ST_MLineFromText()`, `ST_MultiLineStringFromText()`](gis-wkt-functions.html#function_st-mlinefromtext) | 从 WKT 构造 MultiLineString |  |
| [`ST_MLineFromWKB()`, `ST_MultiLineStringFromWKB()`](gis-wkb-functions.html#function_st-mlinefromwkb) | 从 WKB 构造 MultiLineString |  |
| [`ST_MPointFromText()`, `ST_MultiPointFromText()`](gis-wkt-functions.html#function_st-mpointfromtext) | 从 WKT 构造多点 |  |
| [`ST_MPointFromWKB()`, `ST_MultiPointFromWKB()`](gis-wkb-functions.html#function_st-mpointfromwkb) | 从 WKB 构造多点 |  |
| [`ST_MPolyFromText()`, `ST_MultiPolygonFromText()`](gis-wkt-functions.html#function_st-mpolyfromtext) | 从 WKT 构造 MultiPolygon |  |
| [`ST_MPolyFromWKB()`, `ST_MultiPolygonFromWKB()`](gis-wkb-functions.html#function_st-mpolyfromwkb) | 从 WKB 构造 MultiPolygon |  |
| [`ST_NumGeometries()`](gis-geometrycollection-property-functions.html#function_st-numgeometries) | 返回几何集合中的几何数 |  |
| [`ST_NumInteriorRing()`, `ST_NumInteriorRings()`](gis-polygon-property-functions.html#function_st-numinteriorrings) | 返回 Polygon 中的内环数 |  |
| [`ST_NumPoints()`](gis-linestring-property-functions.html#function_st-numpoints) | 返回 LineString 中的点数 |  |
| [`ST_Overlaps()`](spatial-relation-functions-object-shapes.html#function_st-overlaps) | 一个几何图形是否与另一个几何图形重叠 |  |
| [`ST_PointAtDistance()`](spatial-operator-functions.html#function_st-pointatdistance) | 沿 LineString 给定距离的点 | 8.0.24 |
| [`ST_PointFromGeoHash()`](spatial-geohash-functions.html#function_st-pointfromgeohash) | 将 geohash 值转换为 POINT 值 |  |
| [`ST_PointFromText()`](gis-wkt-functions.html#function_st-pointfromtext) | 从 WKT 构造点 |  |
| [`ST_PointFromWKB()`](gis-wkb-functions.html#function_st-pointfromwkb) | 从 WKB 构造点 |  |
| [`ST_PointN()`](gis-linestring-property-functions.html#function_st-pointn) | 从 LineString 返回第 N 个点 |  |
| [`ST_PolyFromText()`, `ST_PolygonFromText()`](gis-wkt-functions.html#function_st-polyfromtext) | 从 WKT 构造多边形 |  |
| [`ST_PolyFromWKB()`, `ST_PolygonFromWKB()`](gis-wkb-functions.html#function_st-polyfromwkb) | 从 WKB 构造多边形 |  |
| [`ST_Simplify()`](spatial-convenience-functions.html#function_st-simplify) | 返回简化几何 |  |
| [`ST_SRID()`](gis-general-property-functions.html#function_st-srid) | 返回几何的空间参考系统 ID |  |
| [`ST_StartPoint()`](gis-linestring-property-functions.html#function_st-startpoint) | 线串的起点 |  |
| [`ST_SwapXY()`](gis-format-conversion-functions.html#function_st-swapxy) | 交换 X/Y 坐标的返回参数 |  |
| [`ST_SymDifference()`](spatial-operator-functions.html#function_st-symdifference) | 返回点设置两个几何的对称差 |  |
| [`ST_Touches()`](spatial-relation-functions-object-shapes.html#function_st-touches) | 一个几何图形是否接触另一个几何图形 |  |
| [`ST_Transform()`](spatial-operator-functions.html#function_st-transform) | 变换几何坐标 | 8.0.13 |
| [`ST_Union()`](spatial-operator-functions.html#function_st-union) | 返回点集两个几何的并集 |  |
| [`ST_Validate()`](spatial-convenience-functions.html#function_st-validate) | 返回经过验证的几何图形 |  |
| [`ST_Within()`](spatial-relation-functions-object-shapes.html#function_st-within) | 一个几何体是否在另一个几何体中 |  |
| [`ST_X()`](gis-point-property-functions.html#function_st-x) | 返回Point的X坐标 |  |
| [`ST_Y()`](gis-point-property-functions.html#function_st-y) | 返回Point的Y坐标 |  |
