create_srs_2

Use the create_srs_2 command to create a spatial reference system. This command takes the extents and the precision as input parameters and calculates the conversion factors internally.

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 extents and the precision as input parameters and calculates the conversion factors internally. The other variation, the create_srs command, takes the conversion factors (offsets and scale factors) as input parameters.

Authorization

The user ID under which the command is invoked must have the following authorities or privileges:
  • SYSADM or DBADM authority
  • INSERT and SELECT privileges on the catalog table or view

Command syntax

DSN5SCLP /create_srs_2 DALLAS
	-srsName srs_name
	-srsId srs_id
	-xMin x_min
	-xMax x_max
	-xScale x_scale
	-yMin y_min
	-yMax y_max
	[-yScale y_scale]
	-zMin z_min
	-zMax z_max
	[-zScale z_scale]
	-mMin m_min
	-mMax m_max
	[-mScale m_scale]
	-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.

The data type of this parameter is INTEGER.

-xMin
Specifies the minimum possible X coordinate value for all geometries that use this spatial reference system. You must specify a non-empty value for this parameter.

-xMax
Specifies the maximum possible X coordinate value for all geometries that use this spatial reference system. You must specify a non-empty value for this parameter.

Depending on the value of -xScale, the value that is shown in the view DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS might be larger than the value that is specified here. The value from the view is correct.

-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. The calculation of the offset -xOffset is based on the -xMin value. You must supply a non-empty value for this parameter.

-yMin
Specifies the minimum possible Y coordinate value for all geometries that use this spatial reference system. You must supply a non-empty value for this parameter.

-yMax
Specifies the maximum possible Y coordinate value for all geometries that use this spatial reference system. You must supply a non-empty value for this parameter.

Depending on the value of -yScale, the value that is shown in the view DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS might be larger than the value that is specified here. The value from the view is correct.

-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. The calculation of the offset -yOffset is based on the -yMin value.

If you do not specify this parameter, 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.

-zMin
Specifies the minimum possible Z coordinate value for all geometries that use this spatial reference system. You must specify a non-empty value for this parameter.

The data type of this parameter is DOUBLE.

-zMax
Specifies the maximum possible Z coordinate value for all geometries that use this spatial reference system. You must specify a non-empty value for this parameter.

Depending on the value of -zScale, the value that is shown in the view DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS might be larger than the value that is specified here. The value from the view is correct.

-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. The calculation of the offset -zOffset is based on the -zMin value. If this parameter is not specified, a value of 1 is used.

-mMin
Specifies the minimum possible M coordinate value for all geometries that use this spatial reference system. You must specify a non-empty value for this parameter.

The data type of this parameter is DOUBLE.

-mMax
Specifies the maximum possible M coordinate value for all geometries that use this spatial reference system. You must specify a non-empty value for this parameter.

Depending on the value of -mScale, the value that is shown in the view DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS might be larger than the value that is specified here. The value from the view is correct.

-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. The calculation of the offset -mOffset is based on the -mMin value.

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 specify 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

This example shows the create_srs_2 command with all of the parameters specified.
DSN5SCLP /create_srs_2 DALLAS +
-srsName MAX14 +
-coordsysName UNSPECIFIED  -srsId 10714 -xmin 310 -xmax 310 +
-xscale 310 -ymin 310 -ymax 310 -yscale 310 +
-zmin 10 -zmax 10 -zscale 10  -mmin 10 -mmax 10 -mscale 300 +
-description ALL_PARMS