Mittwoch, 24. Juni 2015

Feature with wrong geometry type for feature class

We had one feature (Industry Model) which was not displayed in Map. 1 Click Maintenance reported an unsupported geometry type for a polygon feature class. A closer look unveiled that the feature had been migrated as line feature and not as polygon feature:
Line string feature in a polygon feature class (Map Industry Model)

The geometry itself was correct - so it could not be "repaired" in Oracle Spatial. Here is one way to solve the issue:

1. connect via FDO Oracle and add feature class to Map 
   FDO Oracle will create a layer containing lines and polygons - the feature in question will therefore be displayed in Map.

Adding table via FDO Oracle - line and polygon features are displayed

2. save layer as sdf, add sdf to Map and remove layer based on FDO Oracle from Display Manager
3. rectify geometry in SDF based layer - for instance via "extract geometry" 
4. open form for Industry model feature where geometry type is incorrect
5. link rectified geometry with feature - confirm "Feature has already a geometry - replace?" 

Map 2013, SP2

1 Kommentar:

  1. feedback from a reader : if you need to modify multiple features in a similar fashion plain SQL will be faster, example:

    UPDATE ww_sub_drain_area p
    SET p.geom = sdo_geometry(2003, 352257, NULL, mdsys.sdo_elem_info_array( 1, 3, 1), p.geom.sdo_ordinates)
    WHERE p.geom.sdo_gtype = 2002