MySQL 8.4 Release Notes
下表列出了每个空间函数,并提供了每个函数的简要说明。The following table lists each spatial function and provides a short description of each one.
表 14.21 空间函数Table 14.21 Spatial Functions
| 名称Name | 说明Description |
|---|---|
GeomCollection() |
从几何体构建几何集合Construct geometry collection from geometries |
GeometryCollection() |
从几何体构建几何集合Construct geometry collection from geometries |
LineString() |
从点值构建线字符串Construct LineString from Point values |
MBRContains() |
一个几何体的最小外接矩形是否包含另一个几何体的最小外接矩形Whether MBR of one geometry contains MBR of another |
MBRCoveredBy() |
一个 MBR 是否被另一个覆盖Whether one MBR is covered by another |
MBRCovers() |
一个 MBR 是否覆盖另一个Whether one MBR covers another |
MBRDisjoint() |
两个几何体的最小边界矩形是否不相交Whether MBRs of two geometries are disjoint |
MBREquals() |
两个几何体的最小边界矩形是否相等Whether MBRs of two geometries are equal |
MBRIntersects() |
两个几何体的 MBR 是否相交Whether MBRs of two geometries intersect |
MBROverlaps() |
两个几何体的 MBR 是否重叠Whether MBRs of two geometries overlap |
MBRTouches() |
两个几何体的最小外接矩形是否接触Whether MBRs of two geometries touch |
MBRWithin() |
一个几何体的最小外接矩形是否位于另一个几何体的最小外接矩形内Whether MBR of one geometry is within MBR of another |
MultiLineString() |
从 LineString 值构建 MultiLineStringContruct MultiLineString from LineString values |
MultiPoint() |
从点值构建多点Construct MultiPoint from Point values |
MultiPolygon() |
从多边形值构建多多边形Construct MultiPolygon from Polygon values |
Point() |
从坐标构建点Construct Point from coordinates |
Polygon() |
从 LineString 参数构建多边形Construct Polygon from LineString arguments |
ST_Area() |
返回多边形或多多边形的面积Return Polygon or MultiPolygon area |
ST_AsBinary(), ST_AsWKB()ST_AsBinary(), ST_AsWKB() |
从内部几何格式转换为 WKBConvert from internal geometry format to WKB |
ST_AsGeoJSON() |
从几何生成 GeoJSON 对象Generate GeoJSON object from geometry |
ST_AsText(), ST_AsWKT()ST_AsText(), ST_AsWKT() |
从内部几何格式转换为 WKTConvert from internal geometry format to WKT |
ST_Buffer()ST_Buffer() |
返回给定距离内点的几何形状Return geometry of points within given distance from geometry |
ST_Buffer_Strategy() |
为 ST_Buffer() 制定策略选项Produce strategy option for ST_Buffer() |
ST_Centroid() |
将质心作为一个点返回Return centroid as a point |
ST_Collect() |
将空间值聚合到集合中Aggregate spatial values into collection |
ST_Contains() |
一个几何体是否包含另一个几何体Whether one geometry contains another |
ST_ConvexHull()ST_ConvexHull() |
返回几何体的凸包Return convex hull of geometry |
ST_Crosses()ST_Crosses() |
一个几何体是否与另一个几何体相交Whether one geometry crosses another |
ST_Difference()ST_Difference() |
返回两何体的点集差Return point set difference of two geometries |
ST_Dimension()ST_Dimension() |
几何的维度Dimension of geometry |
ST_Disjoint() |
一个几何体是否与另一个几何体不相交Whether one geometry is disjoint from another |
ST_Distance() |
一个几何体到另一个几何体的距离The distance of one geometry from another |
ST_Distance_Sphere()ST_Distance_Sphere() |
地球上两个几何体之间的最小距离Minimum distance on earth between two geometries |
ST_EndPoint()ST_EndPoint() |
线串的终点End Point of LineString |
ST_Envelope() |
返回几何的最小边界矩形Return MBR of geometry |
ST_Equals() |
一个几何是否等于另一个几何Whether one geometry is equal to another |
ST_ExteriorRing() |
返回多边形的外环Return exterior ring of Polygon |
ST_FrechetDistance() |
一个几何体相对于另一个几何体的离散弗雷歇距离The discrete Fréchet distance of one geometry from another |
ST_GeoHash() |
生成一个地理哈希值Produce a geohash value |
ST_GeomCollFromText(), ST_GeometryCollectionFromText(), ST_GeomCollFromTxt() |
从 WKT 返回几何集合Return geometry collection from WKT |
ST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB() |
从 WKB 返回几何集合Return geometry collection from WKB |
ST_GeometryN() |
从几何集合中返回第 N 个几何体Return N-th geometry from geometry collection |
ST_GeometryType() |
返回几何类型的名称Return name of geometry type |
ST_GeomFromGeoJSON() |
从 GeoJSON 对象生成几何图形Generate geometry from GeoJSON object |
ST_GeomFromText(), ST_GeometryFromText() |
从 WKT 返回几何体Return geometry from WKT |
ST_GeomFromWKB(), ST_GeometryFromWKB() |
从 WKB 返回几何体Return geometry from WKB |
ST_HausdorffDistance() |
一个几何体到另一个几何体的离散豪斯多夫距离The discrete Hausdorff distance of one geometry from another |
ST_InteriorRingN() |
返回多边形的第 N 个内环Return N-th interior ring of Polygon |
ST_Intersection() |
返回两何体的点集交集Return point set intersection of two geometries |
ST_Intersects() |
一个几何体是否与另一个几何体相交Whether one geometry intersects another |
ST_IsClosed() |
几何图形是否封闭且简单Whether a geometry is closed and simple |
ST_IsEmpty() |
几何是否为空Whether a geometry is empty |
ST_IsSimple() |
几何形状是否简单Whether a geometry is simple |
ST_IsValid() |
几何是否有效Whether a geometry is valid |
ST_LatFromGeoHash() |
从地理哈希值返回纬度Return latitude from geohash value |
ST_Latitude() |
返回点的纬度Return latitude of Point |
ST_Length() |
返回 LineString 的长度Return length of LineString |
ST_LineFromText(), ST_LineStringFromText() |
从 WKT 构建 LineStringConstruct LineString from WKT |
ST_LineFromWKB(), ST_LineStringFromWKB() |
从 WKB 构建 LineStringConstruct LineString from WKB |
ST_LineInterpolatePoint() |
沿线串的给定百分比的点The point a given percentage along a LineString |
ST_LineInterpolatePoints() |
沿线串的给定百分比的点The points a given percentage along a LineString |
ST_LongFromGeoHash() |
从地理哈希值返回经度Return longitude from geohash value |
ST_Longitude() |
返回点的经度Return longitude of Point |
ST_MakeEnvelope() |
围绕两点的矩形Rectangle around two points |
ST_MLineFromText(), ST_MultiLineStringFromText() |
从 WKT 构造 MultiLineStringConstruct MultiLineString from WKT |
ST_MLineFromWKB(), ST_MultiLineStringFromWKB() |
从 WKB 构造 MultiLineStringConstruct MultiLineString from WKB |
ST_MPointFromText(), ST_MultiPointFromText() |
从 WKT 构建 MultiPointConstruct MultiPoint from WKT |
ST_MPointFromWKB(), ST_MultiPointFromWKB() |
从 WKB 构建 MultiPointConstruct MultiPoint from WKB |
ST_MPolyFromText(), ST_MultiPolygonFromText() |
从 WKT 构建多边形集合Construct MultiPolygon from WKT |
ST_MPolyFromWKB(), ST_MultiPolygonFromWKB() |
从 WKB 构建多边形Construct MultiPolygon from WKB |
ST_NumGeometries() |
返回几何集合中的几何数量Return number of geometries in geometry collection |
ST_NumInteriorRing(), ST_NumInteriorRings() |
返回多边形的内部环数Return number of interior rings in Polygon |
ST_NumPoints() |
返回 LineString 中的点数Return number of points in LineString |
ST_Overlaps() |
一个几何体是否与另一个几何体重叠Whether one geometry overlaps another |
ST_PointAtDistance() |
沿线串的给定距离的点The point a given distance along a LineString |
ST_PointFromGeoHash() |
将 geohash 值转换为 POINT 值Convert geohash value to POINT value |
ST_PointFromText() |
从 WKT 构建点Construct Point from WKT |
ST_PointFromWKB() |
从 WKB 构建点Construct Point from WKB |
ST_PointN() |
从线串中返回第 N 个点Return N-th point from LineString |
ST_PolyFromText(), ST_PolygonFromText() |
从 WKT 构建多边形Construct Polygon from WKT |
ST_PolyFromWKB(), ST_PolygonFromWKB() |
从 WKB 构建多边形Construct Polygon from WKB |
ST_Simplify() |
返回简化几何形状Return simplified geometry |
ST_SRID() |
返回几何体的空间参考系统 IDReturn spatial reference system ID for geometry |
ST_StartPoint() |
LineString 的起点Start Point of LineString |
ST_SwapXY() |
返回交换了 X/Y 坐标的参数Return argument with X/Y coordinates swapped |
ST_SymDifference() |
返回两种几何体的点集对称差Return point set symmetric difference of two geometries |
ST_Touches() |
一个几何体是否接触另一个几何体Whether one geometry touches another |
ST_Transform() |
转换几何的坐标Transform coordinates of geometry |
ST_Union() |
返回两个几何体的点集并集Return point set union of two geometries |
ST_Validate() |
返回已验证的几何图形Return validated geometry |
ST_Within() |
一个几何图形是否在另一个几何图形内Whether one geometry is within another |
ST_X() |
返回点的 X 坐标Return X coordinate of Point |
ST_Y() |
返回点的 Y 坐标Return Y coordinate of Point |