create_srs
Use the create_srs command to create a spatial reference system. This command takes the conversion factors (offsets and scale factors) as input parameters.
A spatial reference system is defined by the coordinate system, the precision, and the extents of coordinates that are represented in this spatial reference system. The extents are the minimum and maximum possible coordinate values for the X, Y, Z, and M coordinates.
This command has two variations. This variation takes the conversion factors (offsets and scale factors) as input parameters. The second variation, the create_srs_2 command, takes the extents and the precision as input parameters and calculates the conversion factors internally.
Authorization
- SYSADM or DBADM authority
- INSERT and SELECT privileges on the catalog table or view
Command syntax
DSN5SCLP /create_srs DALLAS
-srsName srs_name
-srsId srs_id
[-xOffset xoffset]
-xScale xscale
[-yOffset xoffset]
[-yScale xscale]
[-zOffset xoffset]
[-zScale xscale]
[-mOffset xoffset]
[-mScale xscale]
-coordsysName cs_name
[-description description_string]
Parameter descriptions
All parameters are required and case-sensitive unless otherwise indicated.
- -srsName
- Identifies the spatial reference system. You must specify a non-empty value for this parameter.
- -srsId
- Uniquely identifies the spatial reference system.
This numeric identifier is used as an input parameter for various spatial functions. You must specify a non-empty value for this parameter.
- -xOffset
- Specifies the offset for all X coordinates of geometries that
are represented in this spatial reference system. This parameter is
optional.
The offset is subtracted before the scale factor -xScale is applied when geometries are converted from external representations (WKT, WKB, shape) to the IBM® Spatial Support for Db2 for z/OS® internal representation. (WKT is well-known text, and WKB is well-known binary.) If this parameter is not specified, a value of 0 (zero) is used.
- -xScale
- 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 offset -xOffset is
subtracted when geometries are converted from external representations
(WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal
representation. Either the -xOffset value
is specified explicitly, or a default -xOffset value
of 0 is used. You must specify a non-empty value for this parameter.
The data type of this parameter is DOUBLE.
- -yOffset
- Specifies the offset for all Y coordinates of geometries that
are represented in this spatial reference system. This parameter is
optional.
The offset is subtracted before the scale factor -yScale is applied when geometries are converted from external representations (WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal representation. If this parameter is not specified, a value of 0 (zero) is used.
- -yScale
- Specifies the scale factor for all Y coordinates of geometries
that are represented in this spatial reference system. This parameter
is optional.
The scale factor is applied (multiplication) after the offset -yOffset is subtracted when geometries are converted from external representations (WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal representation. Either the -yOffset value is specified explicitly, or a default -yOffset value of 0 is used. If this parameter is not specified, the value of the -xScale parameter is used. If you specify a value for this parameter, the value that you specify must match the value of the -xScale parameter.
- -zOffset
- Specifies the offset for all Z coordinates of geometries that
are represented in this spatial reference system. This parameter is
optional.
The offset is subtracted before the scale factor -zScale is applied when geometries are converted from external representations (WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal representation. If this parameter is not specified, a value of 0 (zero) is used.
- -zScale
- Specifies the scale factor for all Z coordinates of geometries
that are represented in this spatial reference system. This parameter
is optional.
The scale factor is applied (multiplication) after the offset -zOffset is subtracted when geometries are converted from external representations (WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal representation. Either the -zOffset value is specified explicitly, or a default -zOffset value of 0 is used. If this parameter is not specified, a value of 1 is used.
- -mOffset
- Specifies the offset for all M coordinates of geometries that
are represented in this spatial reference system. This parameter is
optional.
The offset is subtracted before the scale factor -mScale is applied when geometries are converted from external representations (WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal representation. If this parameter is not specified, a value of 0 (zero) is used.
- -mScale
- Specifies the scale factor for all M coordinates of geometries
that are represented in this spatial reference system. This parameter
is optional.
The scale factor is applied (multiplication) after the offset -mOffset is subtracted when geometries are converted from external representations (WKT, WKB, shape) to the IBM Spatial Support for Db2 for z/OS internal representation. Either the -mOffset value is specified explicitly, or a default -mOffset value of 0 is used. If this parameter is not specified, a value of 1 is used.
- -coordsysName
- 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. You must supply a non-empty value for this parameter.
- -description
- Describes the spatial reference system by explaining the application's
purpose. This parameter is optional.
If this parameter is not specified, no description information is recorded.
Example
DSN5SCLP /create_srs DALLAS +
-srsName MAX -coordsysName UNSPECIFIED -srsId 107 +
-xscale 100 -xoffset 1 -yscale 100 -yoffset 2 -zscale 300 +
-zoffset 400 -mscale 500 -moffset 600 -description ALL_PARMS