SE_layer_create |
Spatially enables a DBMS table by adding a spatial column to it
LONG SE_layer_create (SE_CONNECTION connection, const SE_LAYERINFO layer, LONG initialf, LONG avg_points);
connection | The connection handle |
layer | A pointer to the layer |
initialf | A positive integer estimating the initial requirement for the number of features to store in this layer; used for database allocation purposes |
avg_points | The estimated average number of points per feature for this map layer; used for database allocation purposes |
SE_layer_create spatially enables an existing DBMS table. The term spatially enables means adding spatial information to any DBMS table. SE_layer_create designates a column as the spatial column. If the column set in the spatial_column field of the SE_LAYERINFO object does not exist, ArcSDE will add it. If it does exist, and if the storage type will be ArcSDE compressed binary storage, then all rows must have a NULL value. The spatial column must be the appropriate type for the database and storage type being used:
Database | Storage Type | Spatial Column Type |
DB2 | Spatial Type | ST_Geometry |
Informix | Spatial Type | ST_Geometry |
Oracle | Compressed Binary | Integer |
Oracle | Spatial Type | ST_Geometry |
SQL Server | Compressed Binary | Integer |
PostgreSQL | Spatial Type | ST_Geometry |
SE_layer_create also builds a spatial index and any geometry schema required by the storage method employed. Spatial information includes the type of spatial feature such as area or line, projection information, false origins, units of measure, and geographic extent.
The required parameters of the SE_LAYERINFO structure to set when creating a layer are:
The optional parameters that you can set in SE_LAYERINFO are:
If the configuration keyword is set in the SE_LAYERINFO object, then set the initialf and avg_pts arguments to zero. If either of these are nonzero, the configuration keyword is ignored.
Initially, only the user ArcSDE administrator and the owner of the layer have access to the layer. Grant access to other users with SE_layer_grant_access.
SE_SUCCESS
SE_FAILURE
SE_ATTR_NOEXIST
SE_DB_IO_ERROR
SE_INVALID_GRIDSIZE
SE_INVALID_ETYPE_MASK
SE_INVALID_LAYER_NUMBER
SE_INVALID_NOT_NULL
SE_INVALID_POINTER
SE_LAYER_EXISTS
SE_NET_FAILURE
SE_NOT_TABLE_OWNER
SE_SDE_NOT_STARTED
SE_WRONG_COLUMN_TYPE