Changes the settings of an existing spatial reference system.
ALTER SPATIAL REFERENCE SYSTEM srs-name [ srs-attribute [ srs-attribute ... ] ] srs-attribute - (back to Syntax) 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 } | TOLERANCE { tolerance-distance | DEFAULT } | SNAP TO GRID { grid-size | DEFAULT } | AXIS ORDER axis-order | POLYGON FORMAT polygon-format | STORAGE FORMAT storage-format grid-size - (back to srs-attribute) DOUBLE : usually between 0 and 1 axis-order - (back to srs-attribute) { 'x/y/z/m' | 'long/lat/z/m' | 'lat/long/z/m' } polygon-format - (back to srs-attribute) { 'CounterClockWise' | 'Clockwise' | 'EvenOdd' } storage-format - (back to srs-attribute) { 'Internal' | 'Original' | 'Mixed' }
SELECT ST_SpatialRefSys::ST_FormatWKT( definition ) FROM ST_SPATIAL_REFERENCE_SYSTEMS WHERE srs_id=4326;
In Interactive SQL, if you double-click the value returned, an easier to read version of the value appears.
When the DEFINITION clause is specified, definition-string is parsed and used to choose default values for attributes. For example, definition-string may contain an AUTHORITY element that defines the organization-name and organization-srs-id.
Parameter values in definition-string are overridden by values explicitly set using the SQL statement clauses. For example, if the ORGANIZATION clause is specified, it overrides the value for ORGANIZATION in definition-string.
If this clause is not specified, and is not defined in the DEFINITION clause, the default is METRE. To add predefined units of measure to the database, use the sa_install_feature system procedure.
If this clause is not specified, and is not defined in the DEFINITION clause, the default is DEGREE for geographic spatial reference systems and NULL for non-geographic spatial reference systems.
The angular unit of measure must be non-NULL for geographic spatial reference systems and it must be NULL for non-geographic spatial reference systems.
The angular unit of measure must be non-NULL for geographic spatial reference systems and it must be NULL for non-geographic spatial reference systems. To add predefined units of measure to the database, use the sa_install_feature system procedure.
To add custom units of measure to the database, use the CREATE SPATIAL UNIT OF MEASURE statement.
For two points that lie directly opposite each other, there is not a single unique plane that intersects the two points and the center of the Earth. Line segments connecting these anti-podal points are not valid and give an error in the ROUND EARTH model.
The ROUND EARTH model treats the Earth as a spheroid and selects lines that follow the curvature of the Earth. In some cases, it may be necessary to use a planar model where a line between two points is interpreted as a straight line in the equirectangular projection where x=long, y=lat.
In the following example, the blue line shows the line interpretation used in the ROUND EARTH model and the red line shows the corresponding PLANAR model.
The PLANAR model may be used to match the interpretation used by other products. The PLANAR model may also be useful because there are some limitations for methods that are not supported in the ROUND EARTH model (such as ST_Area, ST_ConvexHull) and some are partially supported (ST_Distance only supported between point geometries). Geometries based on circularstrings are not supported in ROUND EARTH spatial reference systems.
For non-geographic SRSs, the type must be PLANAR (and that is the default if the TYPE clause is not specified and either the DEFINITION clause is not specified or it uses a non-geographic definition).
Specify UNBOUNDED to place no bounds on the dimensions. Use the BETWEEN clause to set low and high bounds.
The X and Y coordinates must have associated bounds. For geographic spatial reference systems, the longitude coordinate is bounded between -180 and 180 degrees and the latitude coordinate is bounded between -90 and 90 degrees by default the unless COORDINATE clause overrides these settings. For non-geographic spatial reference systems, the CREATE statement must specify bounds for both X and Y coordinates.
LATITUDE and LONGITUDE are used for geographic coordinate systems. The bounds for LATITUDE and LONGITUDE default to the entire Earth, if not specified.
1/f = (semi-major-axis) / (semi-major-axis - semi-minor-axis)
product-name uses the ellipsoid definition when computing distance in geographic spatial reference systems.
When set to 0, two points must be exactly equal to be considered equal.
For round-Earth spatial reference systems, TOLERANCE must be set to 0.
The interpretation used by SAP Sybase IQ is a common but not universal interpretation. Some products use the exact opposite orientation, and some products do not rely on ring orientation to interpret polygons. The POLYGON FORMAT clause can be used to select a polygon interpretation that matches the input data, as needed. The following values are supported:
ALTER SPATIAL REFERENCE SYSTEM mySpatialRef POLYGON FORMAT 'EvenOdd';