<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="information-schema-st-spatial-reference-systems-table">
      </a>
      28.3.36 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045078544016">
  </a>
  <p>
   The
   <a class="link" href="information-schema-st-spatial-reference-systems-table.html" title="28.3.36 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table">
    <code class="literal">
     ST_SPATIAL_REFERENCE_SYSTEMS
    </code>
   </a>
   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.
  </p>
  <p>
   Entries in the
   <a class="link" href="information-schema-st-spatial-reference-systems-table.html" title="28.3.36 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table">
    <code class="literal">
     ST_SPATIAL_REFERENCE_SYSTEMS
    </code>
   </a>
   table
      are based on the
   <a class="ulink" href="http://epsg.org" target="_blank">
    European Petroleum
      Survey Group
   </a>
   (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
   <a class="xref" href="spatial-reference-systems.html" title="13.4.5 Spatial Reference System Support">
    Section 13.4.5, “Spatial Reference System Support”
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="information-schema-st-spatial-reference-systems-table.html" title="28.3.36 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table">
    <code class="literal">
     ST_SPATIAL_REFERENCE_SYSTEMS
    </code>
   </a>
   table has these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       SRS_NAME
      </code>
     </p>
     <p>
      The spatial reference system name. This value is unique.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SRS_ID
      </code>
     </p>
     <p>
      The spatial reference system numeric ID. This value is unique.
     </p>
     <p>
      <code class="literal">
       SRS_ID
      </code>
      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.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ORGANIZATION
      </code>
     </p>
     <p>
      The name of the organization that defined the coordinate
          system on which the spatial reference system is based.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ORGANIZATION_COORDSYS_ID
      </code>
     </p>
     <p>
      The numeric ID given to the spatial reference system by the
          organization that defined it.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DEFINITION
      </code>
     </p>
     <p>
      The spatial reference system definition.
      <code class="literal">
       DEFINITION
      </code>
      values are WKT values,
          represented as specified in the
      <a class="ulink" href="http://www.opengeospatial.org" target="_blank">
       Open Geospatial
          Consortium
      </a>
      document
      <a class="ulink" href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html" target="_blank">
       OGC
          12-063r5
      </a>
      .
     </p>
     <p>
      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.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DESCRIPTION
      </code>
     </p>
     <p>
      The spatial reference system description.
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045078518896">
   </a>
   Notes
  </h4>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      The
      <code class="literal">
       SRS_NAME
      </code>
      ,
      <code class="literal">
       ORGANIZATION
      </code>
      ,
      <code class="literal">
       ORGANIZATION_COORDSYS_ID
      </code>
      , and
      <code class="literal">
       DESCRIPTION
      </code>
      columns contain information
          that may be of interest to users, but they are not used by
          MySQL.
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045078514016">
   </a>
   Example
  </h4>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa60403560"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> ST_SPATIAL_REFERENCE_SYSTEMS
       <span class="token keyword">WHERE</span> SRS_ID <span class="token operator">=</span> <span class="token number">4326</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
                SRS_NAME<span class="token punctuation">:</span> WGS 84
                  SRS_ID<span class="token punctuation">:</span> 4326
            ORGANIZATION<span class="token punctuation">:</span> EPSG
ORGANIZATION_COORDSYS_ID<span class="token punctuation">:</span> 4326
              DEFINITION<span class="token punctuation">:</span> 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<span class="token punctuation">:</span></span></code></pre>
  </div>
  <p>
   This entry describes the SRS used for GPS systems. It has a name
      (
   <code class="literal">
    SRS_NAME
   </code>
   ) of WGS 84 and an ID
      (
   <code class="literal">
    SRS_ID
   </code>
   ) of 4326, which is the ID used by the
   <a class="ulink" href="http://epsg.org" target="_blank">
    European Petroleum Survey
      Group
   </a>
   (EPSG).
  </p>
  <p>
   The
   <code class="literal">
    DEFINITION
   </code>
   values for projected and
      geographic SRSs begin with
   <code class="literal">
    PROJCS
   </code>
   and
   <code class="literal">
    GEOGCS
   </code>
   , respectively. The definition for SRID 0
      is special and has an empty
   <code class="literal">
    DEFINITION
   </code>
   value.
      The following query determines how many entries in the
   <a class="link" href="information-schema-st-spatial-reference-systems-table.html" title="28.3.36 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table">
    <code class="literal">
     ST_SPATIAL_REFERENCE_SYSTEMS
    </code>
   </a>
   table
      correspond to projected, geographic, and other SRSs, based on
   <code class="literal">
    DEFINITION
   </code>
   values:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa25124762"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span>
         <span class="token function">COUNT</span><span class="token punctuation">(</span><span class="token operator">*</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
         <span class="token operator">CASE</span> <span class="token function">LEFT</span><span class="token punctuation">(</span><span class="token keyword">DEFINITION</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">)</span>
           <span class="token keyword">WHEN</span> <span class="token string">'PROJCS'</span> <span class="token keyword">THEN</span> <span class="token string">'Projected'</span>
           <span class="token keyword">WHEN</span> <span class="token string">'GEOGCS'</span> <span class="token keyword">THEN</span> <span class="token string">'Geographic'</span>
           <span class="token keyword">ELSE</span> <span class="token string">'Other'</span>
         <span class="token keyword">END</span> <span class="token keyword">AS</span> SRS_TYPE
       <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span>ST_SPATIAL_REFERENCE_SYSTEMS
       <span class="token keyword">GROUP</span> <span class="token keyword">BY</span> SRS_TYPE<span class="token punctuation">;</span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span> COUNT(*) <span class="token punctuation">|</span> SRS_TYPE   <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span>
<span class="token output"><span class="token punctuation">|</span>        1 <span class="token punctuation">|</span> Other      <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>     4668 <span class="token punctuation">|</span> Projected  <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span>      483 <span class="token punctuation">|</span> Geographic <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">-</span><span class="token punctuation">+</span></span></code></pre>
  </div>
  <p>
   To enable manipulation of SRS entries stored in the data
      dictionary, MySQL provides these SQL statements:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="link" href="create-spatial-reference-system.html" title="15.1.19 CREATE SPATIAL REFERENCE SYSTEM Statement">
       <code class="literal">
        CREATE SPATIAL REFERENCE
          SYSTEM
       </code>
      </a>
      : See
      <a class="xref" href="create-spatial-reference-system.html" title="15.1.19 CREATE SPATIAL REFERENCE SYSTEM Statement">
       Section 15.1.19, “CREATE SPATIAL REFERENCE SYSTEM Statement”
      </a>
      . The
          description for this statement includes additional information
          about SRS components.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="link" href="drop-spatial-reference-system.html" title="15.1.31 DROP SPATIAL REFERENCE SYSTEM Statement">
       <code class="literal">
        DROP SPATIAL REFERENCE SYSTEM
       </code>
      </a>
      :
          See
      <a class="xref" href="drop-spatial-reference-system.html" title="15.1.31 DROP SPATIAL REFERENCE SYSTEM Statement">
       Section 15.1.31, “DROP SPATIAL REFERENCE SYSTEM Statement”
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
