SE_layer_alter |
Alters a layer’s characteristics
LONG SE_layer_alter (SE_CONNECTION connection, const SE_LAYERINFO layer);
connection | The connection handle |
layer | An SE_LAYERINFO structure to define the new characteristics of the layer |
SE_layer_alter changes those characteristics of a layer that can be modified after layer creation. The layer to modify is specified by the layer_id in the SE_LAYERINFO structure.
You can change the following characteristics:
∙ Shape types
∙ Layer description
∙ Grid sizes
∙ Coordinate system
∙ Load mode
You can alter a layer to allow the storage of annotations or CAD elements, but you cannot remove them from the layer. If you try to do so, the SE_INVALID_ALTER_OPERATION code is returned.
A convenient method to change a particular characteristic of a layer is to retrieve the existing layer definition into the SE_LAYERINFO pointer with SE_layer_get_info or SE_layer_get_info_by_id. Modify the characteristic with one of the SE_layerinfo_set_* functions.
SE_SUCCESS
SE_DB_IO_ERROR
SE_HAS_MULTIPLE_SPATIAL_REFERENCES
SE_INVALID_LAYER_NUMBER
SE_INVALID_ALTER_OPERATION
SE_LAYER_NOEXIST
SE_LOCK_CONFLICT
SE_NET_FAILURE
SE_NO_ACCESS
SE_OUT_OF_LOCKS
SE_STREAM_IN_PROGRESS
∙ If any of the grid sizes are modified, the spatial index is deleted and re-created. Grid size modification is only supported for spatial types that use grid indexes.
∙ Only the coordinate system string of the layers coordinate reference can be changed. Changing the coordinate system string changes the metadata but does not change the actual data values. To reproject data, see SE_shape_change_coordref.
∙ Shapes are deleted if their shape type is not allowed after the change.