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.
About this task
- Access by visualization tools
If you want certain visualization tools to generate graphical displays of the data in a spatial column, you need to ensure the integrity of the column's data. You do this by imposing a constraint that requires all rows of the column to use the same spatial reference system. To impose this constraint, register the column, specifying both its name and the spatial reference system that applies to it.
- Access by spatial indexes
Use the same coordinate system for all data in a spatial column on which you want to create an index to ensure that the spatial index returns the correct results. You register a spatial column to constrain all data to use the same spatial reference system and, correspondingly, the same coordinate system.
Procedure
To register a spatial column:
- Run an application that invokes the SYSPROC.ST_register_spatial_column
stored procedure. For more information about this stored procedure, see ST_register_spatial_column.
- Refer to the SRS_NAME column in the DB2GSE.ST_GEOMETRY_COLUMNS view to check the spatial reference system you chose for a particular column after you register the column.