Registering a third-party table containing a spatial column
Use the ArcSDE administration command sdelayer with the register operation to register a spatial table as a feature class.
The register operation allows you to create a feature class from a DBMS table that contains a spatial column defined as a user-defined data type. To date, six different implementations of DBMS spatial data types are supported in ArcSDE geodatabases: Oracle Spatial geometry type (SDO_Geometry), Informix Spatial DataBlade (ST_Geometry), DB2 Spatial Extender (ST_Geometry), spatial type for Oracle (ST_Geometry), spatial type for PostgreSQL (ST_Geometry), PostGIS for PostgreSQL (Geometry), Geometry for SQL Server (Geometry), and Geography for SQL Server (Geography). Tables created with one of these spatial data types and populated using the DBMS SQL interface or some other third-party interface can be added to an ArcSDE geodatabase by registering the existing tables as feature classes.
To register third-party spatial tables, the following prerequisites must be met:
- Only the owner of the table can register it with ArcSDE. Therefore, the user name and password you provide with the -u and -p options must be those for the table owner.
- It must have only one spatial column. Tip:
If the table contains multiple spatial columns, you can create a view of the table that contains only one spatial column.
- It must have no other columns of a user-defined type.
- All records in the table must have the same spatial reference.
- If a spatial reference ID (SRID) is specified with the -R option, that SRID must already exist in the ArcSDE spatial references table in the geodatabase. Default offsets and extents will be calculated based on the spatial reference indicated by the specified SRID.
- The name of the table cannot be mixed case, start with a number, or exceed 128 characters (160 characters in Oracle).
- You must specify the geometry storage type with the -t option. Valid values for the -t option with the register operation are Geography, Geometry, SDO_Geometry, and ST_Geometry. The value specified must match the spatial column type of the table being registered.
- When registering SDO_Geometry tables, it is recommended that you create a spatial index before registering them with ArcSDE.
- You should specify an extent with the -E option.
For syntax and examples using the sdelayer command, see the ArcSDE Administration Command reference included with the ArcSDE component of ArcGIS Server Enterprise.
The autoregistration functionality for SDO_Geometry present in previous ArcSDE versions has been deprecated.
-
At an MS-DOS (Windows) or shell (UNIX or Linux) prompt, execute the sdelayer command with the register operation.
Registering a PostGIS points table with ArcSDE
sdelayer -o register -l samplepts,geom -e p+ -C ptid,SDE -t PG_GEOMETRY -g RTREE -E -76.74381615680447,34.59132803608262,-74.56368991230103,36.18919425895801 -i sde:postgresql:myserver -s myserver -D bigdb -u editor -p open.up
Note:If you register the feature identifier column as user-maintained (-C id,USER) instead of SDE maintained as shown in the example, and you subsequently register the feature class with the geodatabase, ArcGIS adds an additional feature identifier column, ObjectID. ArcGIS maintains the values of this column. If the table contains a large number of records, adding this additional ObjectID column may take some time.