Registering spatial columns

Registering a spatial column creates a constraint on the table, if possible, to ensure that all geometries use the specified spatial reference system.

Before you begin

  • Ensure that your user ID holds the proper authorization to issue the command or call the DB2GSE.ST_REGISTER_SPATIAL_COLUMN procedure.

About this task

When you register a spatial column, all data is constrained to use the same spatial reference system and, correspondingly, the same coordinate system. You might want to register a spatial column in the following situations:
  • To ensure the integrity of the data in the spatial column when using certain visualization tools to generate graphical displays because it uses the same spatial reference system.
  • To ensure that the spatial index returns the correct results because all data in the spatial column that was used to create the index uses the same coordinate system.

Procedure

To register a spatial column:
  • Call the DB2GSE.ST_REGISTER_SPATIAL_COLUMN procedure.

After you register a spatial column, you can query the SRS_NAME column in the DB2GSE.ST_GEOMETRY_COLUMNS view to check the spatial reference system that you chose for that particular column.