AnsweredAssumed Answered

intersecting a geometry with a feature class error in SHAPELIB

Question asked by yellow_rose on Jul 31, 2015
Latest reply on Nov 2, 2015 by SEria-esristaff

I am trying to intersect a geometry with a feature class to get the intersected features with this geometry.

but i get this error:"

Underlying DBMS error[ORA-29902: error in executing ODCIIndexStart() routine

ORA-28578: protocol error during callback from an external procedure

ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 870

ORA-06512: at "SDE.SPX_UTIL", line 2914

ORA-06512: at "SDE.SPX_UTIL", line 3194

ORA-06512: at "SDE.ST_DOMAIN_METHODS", line 299

"

at this line: ESRI.ArcGIS.Geodatabase.IFeature feature = featureCursor.NextFeature();

 

Here is the code:

public static List<ESRI.ArcGIS.Geodatabase.IFeature> PerformSpatialQuery(ESRI.ArcGIS.Geometry.IGeometry

 

 

geometryToSearchBy, ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum spatialRel, ESRI.ArcGIS.Geodatabase.IFeatureClass

 

 

featureClassToSearchIn, string subFields)

        {

            List<ESRI.ArcGIS.Geodatabase.IFeature> featuresLst = null;

            try

            {

                if (geometryToSearchBy != null && !geometryToSearchBy.IsEmpty && subFields != "" && featureClassToSearchIn

 

 

!= null)

                {

                    ESRI.ArcGIS.Geodatabase.ISpatialFilter spatialFilter = new ESRI.ArcGIS.Geodatabase.SpatialFilterClass

 

 

();

 

 

                    spatialFilter.Geometry = geometryToSearchBy;

                    spatialFilter.SpatialRel = spatialRel;

                    spatialFilter.SubFields = subFields;

 

 

                    ESRI.ArcGIS.Geodatabase.IFeatureCursor featureCursor = featureClassToSearchIn.Search(spatialFilter,

 

 

false);

                    featuresLst = new List<ESRI.ArcGIS.Geodatabase.IFeature>();

 

 

                    ESRI.ArcGIS.Geodatabase.IFeature feature = featureCursor.NextFeature();

                    while (feature != null)

                    {

                        featuresLst.Add(feature);

                        feature = featureCursor.NextFeature();

                    }

 

 

                }

 

 

                return featuresLst;

            }

 

 

            catch (Exception ex)

            {

                Logger.LoggerInstance.LogError(ex.Message, DateTime.Now, "PerformSpatialQuery", "SpatialOperations", "");

                throw new Exception(ex.Message);

            }

        }

Outcomes