Use this stored procedure to specify how negative and decimal numbers in a specific coordinate system are to be converted into positive integers, so that DB2 Spatial Extender can store them. Your specifications are collectively called a spatial reference system. When this stored procedure is processed, information about the spatial reference system is added to the DB2GSE.SPATIAL_REF_SYS catalog view. For information about this view, see DB2GSE.SPATIAL_REF_SYS.
For an example of the code for invoking this stored procedure, see the C function gseEnableSref in the sample program. For information about this program, see Writing applications for DB2 Spatial Extender.
Authorization
None required.
Input parameters
Table 16. Input parameters for the db2gse.gse_enable_sref stored procedure.
Name | Data type | Description |
---|---|---|
srId | INTEGER | A numeric identifier for the spatial reference system.
This parameter is not nullable. Comment: This identifier must be unique within your spatially-enabled database. |
srName | VARCHAR(64) | Short description of the spatial reference system.
This parameter is not nullable. Comment: This description must be unique within your spatially-enabled database. |
falsex | DOUBLE | A number that, when subtracted from a negative X coordinate value, leaves
a non-negative number (that is, a positive number or a zero).
This parameter is not nullable. |
falsey | DOUBLE | A number that, when subtracted from a negative Y coordinate value, leaves
a non-negative number (that is, a positive number or a zero).
This parameter is not nullable. |
xyunits | DOUBLE | A number that, when multiplied by a decimal X coordinate or a decimal Y
coordinate, yields an integer that can be stored as a 32-bit data item.
This parameter is not nullable. |
falsez | DOUBLE | A number that, when subtracted from a negative Z coordinate value, leaves
a non-negative number (that is, a positive number or a zero).
This parameter is not nullable. |
zunits | DOUBLE | A number that, when multiplied by a decimal Z coordinate, yields an
integer that can be stored as a 32-bit data item.
This parameter is not nullable. |
falsem | DOUBLE | A number that, when subtracted from a negative measure, leaves a
non-negative number (that is, a positive number or a zero).
This parameter is not nullable. |
munits | DOUBLE | A number that, when multiplied by a decimal measure, yields an integer
that can be stored as a 32-bit data item.
This parameter is not nullable. |
scId | INTEGER | Numeric identifier of the coordinate system from which the spatial
reference system is being derived. To find out what a coordinate
system's numeric identifier is, consult the
DB2GSE.COORD_REF_SYS catalog view DB2GSE.COORD_REF_SYS.
This parameter is not nullable. |
Output parameters
Table 17. Output parameters for the db2gse.gse_enable_sref stored procedure.
Name | Data type | Description |
---|---|---|
msgCode | INTEGER | Code associated with the messages that the caller of this stored procedure can return. |
Reserved | VARCHAR(1024) | Complete error message, as constructed at the DB2 Spatial Extender server. |