Select to view content in your preferred language

List of GP tools that export a FC

379
3
04-26-2024 01:16 PM
Labels (1)
Bud
by
Esteemed Contributor

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)

  1. Feature Classe to Feature Class
  2. Copy Features
  3. Copy (idea: Use the Copy GP tool to copy data to a different workspace)
  4. Any others?


Use Case: I have an issue with an annotation FC.

  1. In some versions of Pro, I get a "shape integrity error" when I open the attribute table and navigate to the last row.
  2. When I copy/paste the FC to an EGDB or FDGB via Catalog, I get a "shape integrity error".
  3. If I export using Feature Class to Feature Class or Copy Features (or Append to an existing FC), only 72 of 800 features get exported. But no error is thrown.

I'm looking for a GP tool that will throw an error when I export the FC, to help find the broken shapes.

0 Kudos
3 Replies
Bud
by
Esteemed Contributor

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:
Bud_0-1714162650264.png
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: 
Bud_1-1714162668656.png
Hopefully this will give you an error at a specific record(s).
0 Kudos
Robert_LeClair
Esri Notable Contributor

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.

Bud
by
Esteemed Contributor

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'

Bud_1-1714192115425.png


Related: ST_GEOMETRY SQL function to find problem annotation shapes

0 Kudos