db2se alter_srs command
The db2se alter_srs command updates a spatial reference system definition.
You can use this command to change the offset, scale, or coordinate system name of a spatial reference system. The information about the coordinate system is available through the DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS catalog view.
Authorization
The user ID must have DBADM and DATAACCESS authority on the spatially enabled database to run this command.
Command syntax
Command parameters
- Specifies the name of the database for which you want to update a spatial reference system definition.
- Specifies the database user ID that has DATAACCESS authority on the database indicated by database_name.
- Specifies the password for user_id.
- Identifies the spatial reference system that you want to update. The srs_name value is converted to uppercase unless you enclose it in double quotation marks.
- Uniquely identifies the spatial reference system. This identifier is used as an input parameter for various spatial functions.
- Specifies the offset for all X coordinates of geometries that are represented in this spatial reference system. The offset is subtracted before the x_scale scale factor is applied when geometries are converted to the Db2® Spatial Extender internal representation from external representations such as, well-known text(WKT), well-known binary (WKB), and shape.
- Specifies the scale factor for all X coordinates of geometries that are represented in this spatial reference system. The scale factor is applied (multiplication) after the x_offset offset is subtracted when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape.
- Specifies the offset for all Y coordinates of geometries that are represented in this spatial reference system. The offset is subtracted before the y_scale scale factor is applied when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape.
- Specifies the scale factor for all Y coordinates of geometries that are represented in this spatial reference system. The scale factor is applied (multiplication) after the y_offset offset is subtracted when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape. This scale factor must be the same as x_scale.
- Specifies the offset for all Z coordinates of geometries that are represented in this spatial reference system. The offset is subtracted before the z_scale scale factor is applied when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape.
- Specifies the scale factor for all Z coordinates of geometries that are represented in this spatial reference system. The scale factor is applied (multiplication) after the z_offset offset is subtracted when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape.
- Specifies the offset for all M coordinates of geometries that are represented in this spatial reference system. The offset is subtracted before the m_scale scale factor is applied when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape.
- Specifies the scale factor for all M coordinates of geometries that are represented in this spatial reference system. The scale factor is applied (multiplication) after the m_offset offset is subtracted when geometries are converted to the Db2 Spatial Extender internal representation from external representations such as, WKT, WKB, and shape.
- Uniquely identifies the coordinate system on which this spatial
reference system is based. The coordinate system must be listed in
the view DB2GSE.ST_COORDINATE_SYSTEMS.
The coordsys_name value is converted to uppercase unless you enclose it in double quotation marks. The maximum length for this parameter is 128 characters.
- Describes the coordinate system by explaining its application. The maximum length for this parameter is 256 characters.
Usage notes
If you use this command to change offset, scale, or coordsys_name parameters of the spatial reference system, and if you have existing spatial data that is associated with the spatial reference 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.
Examples
The following example alters a spatial reference system named MYSRS with a different description.
db2se alter_srs mydb -srsName mysrs
-description "This is my own spatial reference system."The following example alters a spatial reference system named MYSRS_35 with a different xOffset and description because there is no spatial data that uses MYSRS_35. If you have spatial using it, the data becomes unusable.
db2se alter_srs mydb -srsName mysrs_35 -xOffset 35
-description "This is my own spatial reference system with xOffset=35."