We're migrating some feature classes from SDELOB (or some older binary format) to ST_Geometry. As we write our arcpy script to use the ESRI Migrate Storage Tool we'd like to test whether or not something already is ST_Geom...Other than writing hooks into the database, using the comtypes package etc., does anyone know of a simple way to determine this?
To follow-up on PolyGeo's answer, the Describe object is certainly where it should be, but it isn't. Database queries may be the best way to go here.
Although, if you have the SDE command-line binaries, another option would be to try doing something like this (yes it's a hack, but might work):
It would be good if the Describe object were able to access this.
This has now been submitted as an ArcGIS Idea (on which you can vote).
This should be more accessible through ArcPy but in the meantime we can take advantage of the SDE registry tables to find the answer. The
If the feature and geometry table names are the same then the feature class' geometry is stored in the same table as the attributes; otherwise the geometry is stored in a separate feature table (aka "F" table).
So our SQL query would be something like:
For ArcPy, assume "GEODATABASE.sde" is the name of an SDE connection file and "GIS.TAX_PARCELS_POLY" is the name of a feature class stored in the "GIS" schema:
Note this solution only tells you if the geometry is stored in the same table as the feature class and not the actual column type (e.g. SDEBINARY, SDELOB, ST_Geometry) though I do believe that can be found elsewhere in the SDE tables or Oracle.
This could also be further optimized by creating an Oracle function and/or creating a view on the
* Tested with ArcSDE 10.2.2 on Oracle 11g (64-bit).