Geometry validation on tables containing ST_Geometry columns

Geometry validation is provided by the ST_Geometry type through the st_shapelib (Oracle) and st_geometry libraries. Once a table is created, data is validated when records are inserted or updated.

There are two main ways to insert data into spatial tables:

Accessor functions are defined by each spatial type implementation and may use different methods to validate geometry data. ESRI ST_Geometry accessor functions and ArcGIS API use the ESRI shape library to validate geometry data. Third-party spatial types have their own accessor functions and use their own shape verification rules. Therefore, for shape verification rules for spatial types such as SDO_Geometry, PostGIS geometry, and Microsoft SQL Server geometry or geography, read the Oracle, PostGIS, or SQL Server documentation respectively.

The following rules apply to the ESRI shape library and, consequently, ESRI API and ST_Geometry accessor functions.

Validation rules for point shapes

Validation rules for simple lines or linestrings

Validation rules for lines or spaghetti strings

Validation rules and operations for area shapes

Spatial reference ID

If you try to insert a value that has coordinates that are outside the bounds of the spatial reference ID (SRID) provided and with which the table was created, the INSERT statement fails with a message similar to the ones listed here:


Error message


ERROR at line 1:
ORA-20004: Error generating shape from text (-112)
ORA-06512: at "SDE.ST_POLYGON", line 69
ORA-06512: at line 1


ERROR: ESRI: error generating shape [-112]:


SQL Error (-937): Coordinates out of bounds in ST_PolyFromText.


GSE3416N Coordinate out of bounds