ST_ALTER_COORDSYS procedure

Use this stored procedure to update a coordinate system definition in the database. When this stored procedure is processed, information about the coordinate system is updated in the DB2GSE.ST_COORDINATE_SYSTEMS catalog view.

Attention: Use care with this stored procedure. If you use this stored procedure to change the definition of the coordinate system and you have existing spatial data that is associated with a spatial reference system that is based on this coordinate system, you might inadvertently change the spatial data. If spatial data is affected, you are responsible for ensuring that the changed spatial data is still accurate and valid.

Authorization

The user ID under which the stored procedure is invoked must have DBADM authority.

Syntax

Read syntax diagramSkip visual syntax diagramDB2GSE.ST_ALTER_COORDSYS(coordsys_name,definitionnull,organizationnull,organization_coordsys_idnull,descriptionnull, msg_code , msg_text )

Parameter descriptions

coordsys_name
Uniquely identifies the coordinate system. You must specify a non-null value for this parameter.

The coordsys_name value is converted to uppercase unless you enclose it in double quotation marks.

The data type of this parameter is VARCHAR(128) or, if you enclose the value in double quotation marks, VARCHAR(130).

definition
Defines the coordinate system. Although you must specify a value for this parameter, the value can be null. If this parameter is null, the definition of the coordinate system is not changed.

The data type of this parameter is VARCHAR(2048).

organization
Names the organization that defined the coordinate system and provided the definition for it; for example, European Petroleum Survey Group (EPSG). Although you must specify a value for this parameter, the value can be null.

If this parameter is null, the organization of the coordinate system is not changed. If this parameter is not null, the organization_coordsys_id parameter cannot be null; in this case, the combination of the organization and organization_coordsys_id parameters uniquely identifies the coordinate system.

The data type of this parameter is VARCHAR(128).

organization_coordsys_id
Specifies a numeric identifier that is assigned to this coordinate system by the entity listed in the organization parameter. Although you must specify a value for this parameter, the value can be null.

If this parameter is null, the organization parameter must also be null; in this case, the organization's coordinate system identifier is not changed. If this parameter is not null, the organization parameter cannot be null; in this case, the combination of the organization and organization_coordsys_id parameters uniquely identifies the coordinate system.

The data type of this parameter is INTEGER.

description
Describes the coordinate system by explaining its application. Although you must specify a value for this parameter, the value can be null. If this parameter is null, the description information about the coordinate system is not changed.

The data type of this parameter is VARCHAR(256).

Output parameters

msg_code
Specifies the message code that is returned from the stored procedure. The value of this output parameter identifies the error, success, or warning condition that was encountered during the processing of the procedure. If this parameter value is for a success or warning condition, the procedure finished its task. If the parameter value is for an error condition, no changes to the database were performed.

The data type of this output parameter is INTEGER.

msg_text
Specifies the actual message text, associated with the message code, that is returned from the stored procedure. The message text can include additional information about the success, warning, or error condition, such as where an error was encountered.

The data type of this output parameter is VARCHAR(1024).

Example

This example shows how to use the Db2® command line processor to invoke the ST_ALTER_COORDSYS stored procedure. This example uses a Db2 CALL command to update a coordinate system named NORTH_AMERICAN_TEST. This CALL command assigns a value of 1002 to the coordsys_id parameter:

call DB2GSE.ST_ALTER_COORDSYS('NORTH_AMERICAN_TEST',NULL,NULL,1002,NULL,?,?)

The two question marks at the end of this CALL command represent the output parameters, msg_code and msg_text. The values for these output parameters are displayed after the stored procedure runs.