HOW TO
A st_geometry attribute without a spatial index allows geometries to be inserted that contain different spatial reference identifier (SRID) values.
Inserting geometries with different SRID values may be acceptable in some data models and applications, but ArcGIS can only support one entity type and spatial reference for a geometry attribute.
As well, when creating a spatial index on a st_geometry attribute, the spatial index can only support one SRID value for all the st_geometry attributes being indexed.
Instructions provided describe how to create a check constraint on the st_geometry SRID attribute to prevent different SRID values from being set when inserting new attributes into a table without an existing spatial index.
Code:
SQL> CREATE TABLE mobile_locations (
2 objectid NUMBER(38) NOT NULL,
3 shape sde.st_geometry);
Table created.
Code:
SQL> ALTER TABLE mobile_locations
2 ADD CONSTRAINT loc_srid_chk
3 CHECK (shape.srid = 1);
Table altered.
Code:
SQL> INSERT INTO mobile_locations VALUES
2 (1,sde.st_point(10,10,1));
1 row created.
SQL> INSERT INTO mobile_locations VALUES
2 (2,sde.st_point(20,20,2));
insert into mobile_locations values
*
ERROR at line 1:
ORA-02290: check constraint (TOMB.LOC_SRID_CHK) violated
Code:
SQL> CREATE TABLE mobile_locations (
2 objectid NUMBER(38) NOT NULL,
3 shape sde.st_geometry,
4 CONSTRAINT loc_srid_chk
5 CHECK (shape.srid = 1));
Table created.
Get help from ArcGIS experts
Download the Esri Support App