Changes the settings of an existing spatial reference system. See the Remarks section for considerations before altering a spatial reference system.
ALTER SPATIAL REFERENCE SYSTEM
srs-name=
[ srs-attribute [ srs-attribute ... ]
srs-name : string
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
srs-id : integer
semi-major-axis-length : number
semi-minor-axis-length : number
inverse-flattening-ratio : number
grid-size : DOUBLE : usually between 0 and 1
tolerance-distance : number
axis-order : { 'x/y/z/m' | 'long/lat/z/m' | 'lat/long/z/m' }
polygon-format : { 'CounterClockWise' | 'Clockwise' | 'EvenOdd' }
storage-format : { 'Internal' | 'Original' | 'Mixed' }
Complete definitions for each of the clauses is provided in the CREATE SPATIAL REFERENCE SYSTEM statement.
IDENTIFIED BY clause Use this clause to change the SRID number for the spatial reference system.
DEFINITION clause Use this clause to set, or override, default coordinate system settings.
ORGANIZATION clause Use this clause to specify information about the organization that created the spatial reference system that the spatial reference system is based on.
TRANSFORM DEFINITION clause Use this clause to specify a description of the transform to use for the spatial reference system. Currently, only the PROJ.4 transform is supported.
The transform definition is used by the ST_Transform method when transforming data between spatial reference systems. Some transforms may still be possible even if there is no transform-definition-string defined.
COORDINATE clause Use this clause to specify the bounds on the spatial reference system's dimensions. coordinate-name is the name of the coordinate system used by the spatial reference system. For non-geographic types coordinate-name can be x, y, or m. For geographic types, coordinate-name can be LATITUDE, LONGITUDE, z, or m.
LINEAR UNIT OF MEASURE clause Use this clause to specify the linear unit of measure for the spatial reference system. The value you specify must match a linear unit of measure defined in the ST_UNITS_OF_MEASURE system view.
ANGULAR UNIT OF MEASURE clause Use this clause to specify the angular unit of measure for the spatial reference system. The value you specify must match an angular unit of measure defined in the ST_UNITS_OF_MEASURE system table.
TYPE clause Use the TYPE clause to control how the spatial reference system interprets lines between points. For geographic spatial reference systems, the TYPE clause can specify either ROUND EARTH (the default) or PLANAR. For non-geographic spatial reference systems, the type must be PLANAR.
ELLIPSOID clause Use the ellipsoid clause to specify the values to use for representing the Earth as an ellipsoid for spatial reference systems of type ROUND EARTH. If the DEFINITION clause is present, it can specify ellipsoid definition. If the ELLIPSOID clause is specified, it overrides this default ellipsoid.
SNAP TO GRID clause For flat-Earth (planar) spatial reference systems, use the SNAP TO GRID clause to define the size of the grid SQL Anywhere uses when performing calculations. Specify SNAP TO GRID DEFAULT to set the grid size to the default that the database server would use.
For round-Earth spatial reference systems, SNAP TO GRID must be set to 0.
TOLERANCE clause For flat-Earth (planar) spatial reference systems, use the TOLERANCE clause to specify the precision to use when comparing points.
For round-Earth spatial reference systems, TOLERANCE must be set to 0.
POLYGON FORMAT clause Use the POLYGON FORMAT clause to change the polygon interpretation. The following values are supported:
The default polygon format is 'EvenOdd'.
STORAGE FORMAT clause Use the STORAGE FORMAT clause to control what is stored when spatial data is loaded into the database. Possible values are:
'Internal' SQL Anywhere stores only the normalized representation. Specify this when the original input characteristics do not need to be reproduced. This is the default for planar spatial reference systems (TYPE PLANAR).
If you are using MobiLink to synchronize your spatial data, you should specify Mixed instead. MobiLink tests for equality during synchronization, which requires the data in its original format.
'Original' SQL Anywhere stores only the original representation. The original input characteristics can be reproduced, but all operations on the stored values must repeat normalization steps, possibly slowing down operations on the data.
'Mixed' SQL Anywhere stores the internal version and, if it is different from the original version, SQL Anywhere stores the original version as well. By storing both versions, the original representation characteristics can be reproduced and operations on stored values do not need to repeat normalization steps. However, storage requirements may increase significantly because potentially two representations are being stored for each geometry.
Mixed is the default format for round-Earth spatial reference systems (TYPE ROUND EARTH).
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.
Must have DBA authority or be a member of the SYS_SPATIAL_ADMIN_ROLE group.
None
SQL/2008 Vendor extension.
The following example changes the polygon format of a fictitious spatial reference system named mySpatialRef to EvenOdd.
ALTER SPATIAL REFERENCE SYSTEM mySpatialRef POLYGON FORMAT 'EvenOdd'; |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |