User's Guide and Reference

db2gse.gse_register_layer

Use this stored procedure to register a spatial column as a layer. When this stored procedure is processed, information about the layer being registered is added to the DB2GSE.GEOMETRY_COLUMNS catalog view. For information about this view, see DB2GSE.GEOMETRY_COLUMNS.

For an example of the code for invoking this stored procedure, see the C function gseRegisterLayer in the sample program. For information about this program, see Writing applications for DB2 Spatial Extender.

Authorization

The user ID under which this stored procedure is invoked must hold one of the following authorities or privileges:

Input parameters

Table 26. Input parameters for the db2gse.gse_register_layer stored procedure.
Name Data type Description
layerSchema INTEGER(30) Name of the schema to which the table or view specified in the layerTable parameter belongs.

This parameter is nullable.

Comment: If you do not supply a value for the layerSchema parameter, it will default to the user ID under which the db2gse.gse_register_layer stored procedure is invoked.

layerTable VARCHAR(128) Name of the table or view that contains the column that is being registered as a layer.

This parameter is not nullable.

layerColumn VARCHAR(128) Name of the column that is being registered as a layer. If the column does not exist, DB2 Spatial Extender will create it.

This parameter is not nullable.

layerTypeName VARCHAR(64) Data type of the column that is being registered as a layer. You must specify the data type in uppercase; for example:
ST_POINT

This parameter is not nullable if the column is a table column that is to be created when this stored procedure is processed. Otherwise, if the column is an existing column within a table or view, this parameter is nullable.

srId INTEGER Identifier of the spatial reference system used for this layer.

This parameter is not nullable for a table layer. DB2 Spatial Extender ignores this parameter when you register a view layer.

geoSchema VARCHAR(30) Applies when you register a view column as a layer. The geoSchema parameter is the schema of the table that underlies the view to which the column belongs.

This parameter is nullable when you register a view column as a layer. DB2 Spatial Extender ignores this parameter when you register a table column as a layer.

Comment: If you do not supply a value for the geoSchema parameter, it will default to the value of the layerSchema parameter.

geoTable VARCHAR(128) Applies when you register a view column as a layer. The geoTable parameter is the name of the table that underlies the view to which the column belongs.

This parameter is not nullable when you register a view column as a layer. DB2 Spatial Extender ignores this parameter when you register a table column as a layer.

geoColumn VARCHAR(128) Applies when you register a view column as a layer. The geoColumn parameter is the name of the table column that underlies this view column.

This parameter is not nullable when you register a view column as a layer. DB2 Spatial Extender ignores this parameter when you register a table column as a layer.

nAttributes SMALLINT Number of columns that contain the source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

attr1Name VARCHAR(128) Name of the first column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

If you intend to use the default geocoder, you need to store street addresses in the attr1Name column.

attr2Name VARCHAR(128) Name of the second column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

If you intend to use the default geocoder, you need to store names of cities in the attr2Name column.

attr3Name VARCHAR(128) Name of the third column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

If you intend to use the default geocoder, you need to store names or abbreviations of states in the attr3Name column.

attr4Name VARCHAR(128) Name of the fourth column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

If you intend to use the default geocoder, you need to store zip codes in the attr4Name column.

attr5Name VARCHAR(128) Name of the fifth column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

The default gecoder ignores the Attr5Name column.

attr6Name VARCHAR(128) Name of the sixth column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

The default gecoder ignores the Attr6Name column.

attr7Name VARCHAR(128) Name of the seventh column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

The default gecoder ignores the Attr7Name column.

attr8Name VARCHAR(128) Name of the eighth column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

The default gecoder ignores the Attr8Name column.

attr9Name VARCHAR(128) Name of the ninth column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

The default gecoder ignores the Attr9Name column.

attr10Name VARCHAR(128) Name of the tenth column that contains source data that is to be geocoded for this layer.

This parameter is nullable when you register a table column as a layer. DB2 Spatial Extender ignores this parameter when you register a view column as a layer.

The default gecoder ignores the Attr10Name column.

Output parameters

Table 27. Output parameters for the db2gse.gse_register_layer 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.

Restrictions


[ Top of Page | Previous Page | Next Page ]