PDF (A4) - 41.5Mb
Man Pages (TGZ) - 272.3Kb
Man Pages (Zip) - 378.2Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb
TheST_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.
Entries in theST_SPATIAL_REFERENCE_SYSTEMS table are based on theEuropean 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, seeSection 13.4.5, “Spatial Reference System Support”.
TheST_SPATIAL_REFERENCE_SYSTEMS table has these columns:
SRS_NAMEThe spatial reference system name. This value is unique.
SRS_IDThe spatial reference system numeric ID. This value is unique.
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.ORGANIZATIONThe name of the organization that defined the coordinate system on which the spatial reference system is based.
ORGANIZATION_COORDSYS_IDThe numeric ID given to the spatial reference system by the organization that defined it.
DEFINITIONThe spatial reference system definition.
DEFINITIONvalues are WKT values, represented as specified in theOpen Geospatial Consortium documentOGC 12-063r5.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.
DESCRIPTIONThe spatial reference system description.
Notes
The
SRS_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_SYSTEMS WHERE SRS_ID = 4326\G*************************** 1. row *************************** SRS_NAME: WGS 84 SRS_ID: 4326 ORGANIZATION: EPSGORGANIZATION_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: 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 theEuropean Petroleum Survey Group (EPSG).
TheDEFINITION values for projected and geographic SRSs begin withPROJCS andGEOGCS, respectively. The definition for SRID 0 is special and has an emptyDEFINITION value. The following query determines how many entries in theST_SPATIAL_REFERENCE_SYSTEMS table correspond to projected, geographic, and other SRSs, based onDEFINITION 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 |+----------+------------+To enable manipulation of SRS entries stored in the data dictionary, MySQL provides these SQL statements:
CREATE SPATIAL REFERENCE SYSTEM: SeeSection 15.1.23, “CREATE SPATIAL REFERENCE SYSTEM Statement”. The description for this statement includes additional information about SRS components.DROP SPATIAL REFERENCE SYSTEM: SeeSection 15.1.36, “DROP SPATIAL REFERENCE SYSTEM Statement”.
PDF (A4) - 41.5Mb
Man Pages (TGZ) - 272.3Kb
Man Pages (Zip) - 378.2Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb