ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 eGDB:
What geoprocessing tools can be used to export a feature class? (enterprise geodatabase to file geodatabase)
Use Case: I have an issue with an annotation FC.
I'm looking for a GP tool that will throw an error when I export the FC, to help find the broken shapes.
Background:
GP tool to export one feature at a time and log problem features in an error table
Esri Case #03605230 - ...Catalog copy/paste shape integrity error
Esri Support:
There is definitely a way to loop over features using Model Builder. In this case, you can use the Feature Selection Iterator:
https://pro.arcgis.com/en/pro-app/2.9/tool-reference/modelbuilder-toolbox/iterate-feature-selection....
By default, this selects each record in the attribute table and you can use the ObjectID value to output a specific feature class name:
In the example above, I connected my beaverriver feature class to the Iterate Feature Selection tool. From each selected feature, I am exporting it to a new feature class with a new name "beaverriver_ExportFeatures_%Value%". The %Value% tag takes the ObjectID value from the iterator and inserts it into the output feature class name. The result is as follows:
Hopefully this will give you an error at a specific record(s).
Based upon your configuration with Oracle 18c and the 10.7.1 geodatabase, this could be BUG-000129584 - Error “ORA-20802: Shape integrity Error” is returned for the ST_INTERSECTION() function on some data when ST_GEOMETRY is configured using 10.7 or 10.8 ST_SHAPE libraries."
The BUG is not reproducible when the ST_SHAPE library from 10.6.1 and 10.6 is used but is reproducible with Oracle 19.3.0 with ST_SHAPE 10.7.1 and 10.8.
Current workaround is to use the 10.6 ST_SHAPE library to configure ST_GEOMETRY. May be worth a try to see if this is or is not the cause.
Thanks @Robert_LeClair! Your note about ST_INTERSECTION() gave me an idea about finding the problem row.
In an SQL query, I wrote a custom function that uses ST_INTERSECTS() to check if each feature can be used in a spatial SQL operation. If there is an error, then the function returns "error" to the query's resultset. That let me flag the problem row.
Stack Overflow: Find row with problem shape (SDE.ST_GEOMETRY spatial type)
with function check_shape(anno_shape sde.st_geometry, boundary_shape sde.st_geometry) return varchar2 is v_test_result varchar2(10); begin select sde.st_intersects (boundary_shape, anno_shape) into v_test_result from dual; return 'no error'; exception when others then return 'error'; end; select anno.objectid, anno.shape as anno_shape, check_shape(anno.shape, boundary.shape) as check_shape from city.boundary boundary cross join infrastr.gcsm_hc_anno anno where check_shape(anno.shape, boundary.shape) = 'error'
Related: ST_GEOMETRY SQL function to find problem annotation shapes