Spatial values, or geometries, have the properties described in Section 11.4.2.2, “Geometry Class”. 空间值或几何图形具有第11.4.2.2节,“几何图形类别”中所述的特性。The following discussion lists general spatial function argument-handling characteristics. 下面的讨论列出了一般的空间函数参数处理特性。Specific functions or groups of functions may have additional or different argument-handling characteristics, as discussed in the sections where those function descriptions occur. 特定函数或函数组可能具有附加的或不同的参数处理特性,这些特性将在出现这些函数描述的部分中讨论。Where that is true, those descriptions take precedence over the general discussion here.在这种情况下,这些描述优先于这里的一般性讨论。
Spatial functions are defined only for valid geometry values. 空间函数仅为有效的几何图形值定义。See Section 11.4.4, “Geometry Well-Formedness and Validity”.
Each geometry value is associated with a spatial reference system (SRS), which is a coordinate-based system for geographic locations. 每个几何值都与空间参考系(SRS)相关联,SRS是地理位置的基于坐标的系统。See Section 11.4.5, “Spatial Reference System Support”.见第11.4.5节,“空间参考系统支持”。
The spatial reference identifier (SRID) of a geometry identifies the SRS in which the geometry is defined. 几何体的空间参考标识符(SRID)标识在其中定义几何体的sr。In MySQL, the SRID value is an integer associated with the geometry value. 在MySQL中,SRID值是与geometry值关联的整数。The maximum usable SRID value is 232−1. If a larger value is given, only the lower 32 bits are used.最大可用SRID值为2321。如果给定较大的值,则仅使用较低的32位。
SRID 0 represents an infinite flat Cartesian plane with no units assigned to its axes. SRID 0表示没有为其轴指定单位的无限平面笛卡尔平面。To ensure SRID 0 behavior, create geometry values using SRID 0. SRID 0 is the default for new geometry values if no SRID is specified.要确保SRID 0的行为,请使用SRID 0创建几何体值。如果未指定SRID,则SRID 0是新几何体值的默认值。
For computations on multiple geometry values, all values must be in the same SRS or an error occurs. 对于多个几何体值的计算,所有值必须在同一SRS中,否则会发生错误。Thus, spatial functions that take multiple geometry arguments require those arguments to be in the same SRS. 因此,采用多个几何参数的空间函数要求这些参数位于同一SRS中。If a spatial function returns 如果一个空间函数返回ER_GIS_DIFFERENT_SRIDS
, it means that the geometry arguments were not all in the same SRS. ER_GIS_DIFFERENT_SRIDS
,这意味着几何参数并不都在同一SRS中。You must modify them to have the same SRS.您必须修改它们以具有相同的SRS。
A geometry returned by a spatial function is in the SRS of the geometry arguments because geometry values produced by any spatial function inherit the SRID of the geometry arguments.空间函数返回的几何体位于几何体参数的SRS中,因为任何空间函数生成的几何体值都继承几何体参数的SRID。
The Open Geospatial Consortium guidelines require that input polygons already be closed, so unclosed polygons are rejected as invalid rather than being closed.开放地理空间联盟指南要求输入多边形已经关闭,因此未关闭的多边形将被视为无效而拒绝,而不是关闭。
In MySQL, the only valid empty geometry is represented in the form of an empty geometry collection. 在MySQL中,唯一有效的空几何体以空几何体集合的形式表示。Empty geometry collection handling is as follows: An empty WKT input geometry collection may be specified as 空几何体集合处理如下:空WKT输入几何体集合可以指定为'GEOMETRYCOLLECTION()'
. 'GEOMETRYCOLLECTION()'
。This is also the output WKT resulting from a spatial operation that produces an empty geometry collection.这也是产生空几何体集合的空间操作产生的输出WKT。
During parsing of a nested geometry collection, the collection is flattened and its basic components are used in various GIS operations to compute results. 在分析嵌套几何体集合的过程中,集合被展平,其基本组件用于各种GIS操作以计算结果。This provides additional flexibility to users because it is unnecessary to be concerned about the uniqueness of geometry data. 这为用户提供了额外的灵活性,因为不必担心几何数据的唯一性。Nested geometry collections may be produced from nested GIS function calls without having to be explicitly flattened first.嵌套的几何图形集合可以通过嵌套的GIS函数调用生成,而无需首先显式展平。