Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in a class extension, I'm trying to do search features inside a point feature class(part of a geometric network on an sql server sde database) and I get a -2147215922 (FDO_E_SE_INVALID_NUM_PARTS) error.

The geometry I'm using to create my search filter is actually a Polygon created with the ISegmentCollection.SetCircle function. Basically, I'm trying to find some features inside a circle defined by a point and a radius

void CTools::FillArrayWithFeatures(IFeatureClassPtr ipFeatureClass, 
              IPointPtr ipPoint, double fRadius, CAtlArray<IFeature*>* pArrFeature)
    //create the geometry
    IGeometryPtr ipGeometry;
    IPolygonPtr ipPolygon(CLSID_Polygon);
    ISegmentCollectionPtr ipSegmentCollection(ipPolygon);
    HRESULT hr = ipSegmentCollection->SetCircle(ipPoint, fRadius);
    ipGeometry = ipSegmentCollection;
    ISpatialReferencePtr ipSpatialRef;

    //Create the spatial filter
    ISpatialFilterPtr ipSpatialFilter(CLSID_SpatialFilter);
    BSTR strName;

     // Execute the search 
    IFeatureCursorPtr ipFeatureCursor;
    HRESULT hr = ipFeatureClass->Search(ipSpatialFilter, VARIANT_FALSE, &ipFeatureCursor);

    //Fill the array with the results
        IFeature* pFoundFeature;
        hr = ipFeatureCursor->NextFeature(&pFoundFeature);

Am I doing something wrong? The same code works on a personnal geodatabase, but not on an sde sql server


share|improve this question
If this is still an issue would you be able to edit your Question to update it with the ArcGIS for Desktop version you are currently using, and any other information that might help elicit an Answer. – PolyGeo Oct 8 '13 at 8:25
My problem is not version-specific. I happens on different ArcGIS for Desktop versions. – Goldorak84 Oct 8 '13 at 13:12
Is your database able to accept 'curve' geometry types? SDE is very rigid about bad geometries and may be rejecting the curves resulting in 0 parts i.e. an empty feature and then rejecting that too. – Michael Miles-Stimson Oct 9 '13 at 1:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.