ALTER SPATIAL REFERENCE SYSTEM Statement

Changes the settings of an existing spatial reference system. See the Remarks section for considerations before altering a spatial reference system

Syntax

ALTER SPATIAL REFERENCE SYSTEM
    srs-name
    [ srs-attribute [ srs-attribute ... ] ]

srs-attribute: 
    SRID srs-id
    | DEFINITION { definition-string | NULL }
    | ORGANIZATION { organization-name IDENTIFIED BY organization-srs-id | NULL } 
    | TRANSFORM DEFINITION { transform-definition-string | NULL } 
    | LINEAR UNIT OF MEASURE linear-unit-name 
    | ANGULAR UNIT OF MEASURE { angular-unit-name | NULL } 
    | TYPE { ROUND EARTH | PLANAR } 
    | COORDINATE coordinate-name { UNBOUNDED | BETWEEN low-number AND high-number } 
    | ELLIPSOID SEMI MAJOR AXIS semi-major-axis-length { SEMI MINOR AXIS semi-minor-axis-length 
    | INVERSE FLATTENING inverse-flattening-ratio } 
    | SNAP TO GRID { grid-size | DEFAULT } 
    | TOLERANCE { tolerance-distance | DEFAULT } 
    | POLYGON FORMAT polygon-format 
    | STORAGE FORMAT storage-format 

grid-size:
   DOUBLE : usually between 0 and 1

axis-order:
   { 'x/y/z/m' | 'long/lat/z/m' | 'lat/long/z/m' }

polygon-format:
   { 'CounterClockWise' | 'Clockwise' | 'EvenOdd' }

storage-format:
   { 'Internal' | 'Original' | 'Mixed' }

Parameters

Examples

Usage

You cannot alter a spatial reference system if there is existing data that references it. For example, if you have a column declared as ST_Point(SRID=8743), you cannot alter the spatial reference system with SRID 8743. This is because many spatial reference system attributes, such as storage format, impact the storage format of the data. If you have data that references the SRID, create a new spatial reference system and transform the data to the new SRID.

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Requires one of: