Home | Concepts | API | Samples |
Concepts > Schema Objects > Layers | |
Managing Spatial Columns | |
Spatial columns are added to tables to store geometric values for a feature. The
spatial column has associated metadata maintained in the LAYERS (or SDE_layers) table. This
information defines the type of geometric shapes that may be stored in a spatial
column, the coordinate reference system, spatial index values, update
privileges, and so on. You access and update layer metadata through an opaque pointer to an SE_LAYERINFO object. Most characteristics are user-defined, but a few, such as the layer ID and creation date, are set by the ArcSDE software. Before working with a spatial column (or layer), you must initialize an SE_LAYERINFO object with SE_layerinfo_create. Adding a new spatial column Spatial columns are created by the SE_layer_create function. This function
adds the new spatial column to the business table, adds a record to the LAYERS
table, and creates the background tables that store the shape data and sets up the
required database triggers if using a binary schema implementation. To add a spatial column to a table, you must be the owner
of the table. Layer operations Applications must be able to interact with the layer object. Possible operations include creating an ArcSDE layer by spatially enabling a table, deleting an ArcSDE layer by removing spatial data from a table, retrieving information about the layer including the types of features, and accessing layers by table name or number. In addition to layer administration functions, there are layer utility functions, such as a layer envelope calculation function. In the following example, the cities table is spatially enabled by adding the boundary spatial column:
/* Create a coordinate reference system structure. */ Deleting a spatial column Spatial columns are deleted using the SE_layer_delete function. This function
deletes the spatial column entry in the LAYERS table, drops the feature and
spatial index tables associated with the layer, and nullifies the contents of the
spatial index column in the business table. Deleting a layer does not delete the
business table, it just NULLS the spatial column.
/* Delete the spatial column */ |
feedback |
privacy |
legal |