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_IDvalues 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.DEFINITIONvalues 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 不使用这些信息。TheSRS_NAME,ORGANIZATION,ORGANIZATION_COORDSYS_ID, andDESCRIPTIONcolumns contain information that may be of interest to users, but they are not used by MySQL.
示例Example
mysql>SELECT * FROM ST_SPATIAL_REFERENCE_SYSTEMSWHERE 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>SELECTCOUNT(*),CASE LEFT(DEFINITION, 6)WHEN 'PROJCS' THEN 'Projected'WHEN 'GEOGCS' THEN 'Geographic'ELSE 'Other'END AS SRS_TYPEFROM INFORMATION_SCHEMA.ST_SPATIAL_REFERENCE_SYSTEMSGROUP 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:
CREATE SPATIAL REFERENCE SYSTEM:请参见 第 15.1.19 节,“CREATE SPATIAL REFERENCE SYSTEM 语句”。此语句的描述包括关于 SRS 组件的更多信息。CREATE SPATIAL REFERENCE SYSTEM: See Section 15.1.19, “CREATE SPATIAL REFERENCE SYSTEM Statement”. The description for this statement includes additional information about SRS components.DROP SPATIAL REFERENCE SYSTEM:请参见 第 15.1.31 节,“DROP SPATIAL REFERENCE SYSTEM 语句”。DROP SPATIAL REFERENCE SYSTEM: See Section 15.1.31, “DROP SPATIAL REFERENCE SYSTEM Statement”.