文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 28 个 INFORMATION_SCHEMA 表 / 28.3 INFORMATION_SCHEMA 总表 / 28.3.36 INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS 表
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 88%

28.3.36 INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS 表28.3.36 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table

ST_SPATIAL_REFERENCE_SYSTEMS 表提供有关空间数据可用空间参考系统(SRS)的信息。此表基于 SQL/MM(ISO/IEC 13249-3)标准。The ST_SPATIAL_REFERENCE_SYSTEMS table provides information about available spatial reference systems (SRSs) for spatial data. This table is based on the SQL/MM (ISO/IEC 13249-3) standard.

ST_SPATIAL_REFERENCE_SYSTEMS 表中的条目基于 欧洲石油勘测组(EPSG)数据集,除了 SRID 0,它对应于 MySQL 中使用的特殊 SRS,表示一个无限平面笛卡尔坐标系,其轴没有分配单位。有关 SRS 的更多信息,请参阅 第 13.4.5 节,“空间参考系统支持”。Entries in the ST_SPATIAL_REFERENCE_SYSTEMS table are based on the European Petroleum Survey Group (EPSG) data set, except for SRID 0, which corresponds to a special SRS used in MySQL that represents an infinite flat Cartesian plane with no units assigned to its axes. For additional information about SRSs, see Section 13.4.5, “Spatial Reference System Support”.

ST_SPATIAL_REFERENCE_SYSTEMS 表包含以下列:The ST_SPATIAL_REFERENCE_SYSTEMS table has these columns:

  • SRS_NAME

    空间参考系统名称。此值是唯一的。The spatial reference system name. This value is unique.

  • SRS_ID

    空间参考系统数字 ID。此值是唯一的。The spatial reference system numeric ID. This value is unique.

    SRS_ID 的值表示与几何值的 SRID 相同类型的值,或者作为 SRID 参数传递给空间函数。SRID 0(无单位的笛卡尔平面)是特殊的。它始终是合法的空间参考系统 ID,并且可以用于任何依赖 SRID 值的空间数据计算。SRS_ID values represent the same kind of values as the SRID of geometry values or passed as the SRID argument to spatial functions. SRID 0 (the unitless Cartesian plane) is special. It is always a legal spatial reference system ID and can be used in any computations on spatial data that depend on SRID values.

  • ORGANIZATIONORGANIZATION

    定义空间参考系统所基于的坐标系统的组织名称。The name of the organization that defined the coordinate system on which the spatial reference system is based.

  • ORGANIZATION_COORDSYS_ID

    该组织为空间参考系统分配的数字 ID。The numeric ID given to the spatial reference system by the organization that defined it.

  • DEFINITIONDEFINITION

    空间参考系统定义。DEFINITION 的值是 WKT 值,按照 开放地理空间协会 文件 OGC 12-063r5 中的规定表示。The spatial reference system definition. DEFINITION values are WKT values, represented as specified in the Open Geospatial Consortium document OGC 12-063r5.

    当 GIS 函数需要定义时,会按需解析 SRS 定义。解析后的定义会存储在数据字典缓存中,以便重用,并避免为每个需要 SRS 信息的语句产生解析开销。SRS definition parsing occurs on demand when definitions are needed by GIS functions. Parsed definitions are stored in the data dictionary cache to enable reuse and avoid incurring parsing overhead for every statement that needs SRS information.

  • DESCRIPTIONDESCRIPTION

    空间参考系统描述。The spatial reference system description.

说明Notes

  • SRS_NAME、ORGANIZATION、ORGANIZATION_COORDSYS_ID 和 DESCRIPTION 列包含用户可能感兴趣的信息,但 MySQL 不使用这些信息。The SRS_NAME, ORGANIZATION, ORGANIZATION_COORDSYS_ID, and DESCRIPTION columns contain information that may be of interest to users, but they are not used by MySQL.

示例Example

mysql> SELECT * FROM ST_SPATIAL_REFERENCE_SYSTEMS
       WHERE SRS_ID = 4326\G
*************************** 1. row ***************************
                SRS_NAME: WGS 84
                  SRS_ID: 4326
            ORGANIZATION: EPSG
ORGANIZATION_COORDSYS_ID: 4326
              DEFINITION: GEOGCS["WGS 84",DATUM["World Geodetic System 1984",
                          SPHEROID["WGS 84",6378137,298.257223563,
                          AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],
                          PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
                          UNIT["degree",0.017453292519943278,
                          AUTHORITY["EPSG","9122"]],
                          AXIS["Lat",NORTH],AXIS["Long",EAST],
                          AUTHORITY["EPSG","4326"]]
             DESCRIPTION:

此条目描述了用于 GPS 系统的 SRS。它的名称(SRS_NAME)为 WGS 84,ID(SRS_ID)为 4326,这是由欧洲石油测量组(EPSG)使用的 ID。This entry describes the SRS used for GPS systems. It has a name (SRS_NAME) of WGS 84 and an ID (SRS_ID) of 4326, which is the ID used by the European Petroleum Survey Group (EPSG).

投影和地理 SRS 的 DEFINITION 值分别以 PROJCS 和 GEOGCS 开头。SRID 为 0 的定义是特殊的,其 DEFINITION 值为空。以下查询根据 DEFINITION 值确定 ST_SPATIAL_REFERENCE_SYSTEMS 表中分别有多少条目对应投影、地理和其他 SRS:The DEFINITION values for projected and geographic SRSs begin with PROJCS and GEOGCS, respectively. The definition for SRID 0 is special and has an empty DEFINITION value. The following query determines how many entries in the ST_SPATIAL_REFERENCE_SYSTEMS table correspond to projected, geographic, and other SRSs, based on DEFINITION values:

mysql> SELECT
         COUNT(*),
         CASE LEFT(DEFINITION, 6)
           WHEN 'PROJCS' THEN 'Projected'
           WHEN 'GEOGCS' THEN 'Geographic'
           ELSE 'Other'
         END AS SRS_TYPE
       FROM INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMS
       GROUP BY SRS_TYPE;
+----------+------------+
| COUNT(*) | SRS_TYPE   |
+----------+------------+
|        1 | Other      |
|     4668 | Projected  |
|      483 | Geographic |
+----------+------------+

为了能够操作存储在数据字典中的 SRS 条目,MySQL 提供了以下 SQL 语句:To enable manipulation of SRS entries stored in the data dictionary, MySQL provides these SQL statements: