register_spatial_column
Use the register_spatial_column command to register a spatial column and to associate a spatial reference system (SRS) with it.
When this command is processed, information about the spatial column that is being registered is added to the DB2GSE.ST_GEOMETRY_COLUMNS catalog view. Registering a spatial column creates a constraint on the table, if possible, to ensure that all geometries use the specified SRS.
Note: Even if you drop the table that
was used to register the spatial column, you must still run the unregister_spatial_column
command to remove the entry for the spatial column. Otherwise, if
you create the table again and use the register_spatial_column command
to register the same spatial column, error GSE1003N will occur. For
more information about this message, see GSE1003N.
Authorization
The user ID under which this
command is invoked must hold one of the following authorities or privileges:
- SYSADM or DBADM authority on the database that contains the table to which the spatial column that is being registered belongs
- All table or view privileges on this table
Command syntax
DSN5SCLP /register_spatial_column DALLAS
[-tableSchema schema]
-tableName table_name
-columnName column_name
-srsName srs_name
Parameter descriptions
All parameters are required and case-sensitive unless otherwise indicated.
- -tableSchema
- Identifies the schema to which the table or view that is specified
in the -tableName parameter belongs. This
parameter is optional.
If this parameter is not specified, the value in the CURRENT SCHEMA special register is used as the schema name for the table or view.
- -tableName
- Identifies the unqualified name of the table or view that contains the column that is being registered. You must specify a non-empty value for this parameter.
- -columnName
- Identifies the column that is being registered. You must specify a non-empty value for this parameter.
- -srsName
- Identifies the spatial reference system that is to be used for this spatial column. You must specify a non-empty value for this parameter.
Example
This example shows the register_spatial_column
command with all of the parameters specified.
DSN5SCLP /register_spatial_column DALLAS +
-tableSchema DB2GSE -tableName TABLE2 -columnName SPATIALCOL +
-srsName NAD83_SRS_1