I use the Esri-function ConstructBuffers in my arcobjects program. The call of this method produces a Error with code -2147220889.

Looking up the error constants it says:

FDO_E_WORKSPACE_INVALID_KEYSETID -2147220889 Returned Keyset id is invalid.

what does that mean?

The geometriy list that I provide for the buffer creation is created by myself in my Software. I did some operations to make sure the geometries are correct like: Simplify, SnapToSpatialReference. The buffer creation is executed in a loop and strangely it works with most geometry lists that I provide as input but only crashes with a few of them. I can not see why that is so. Who has an idea what could be the cause?

            IGeometryBag subcurvesBag = new GeometryBagClass();
            IGeometryCollection subcurvesCollection = (IGeometryCollection) subcurvesBag;
            GeometryBag buffersGeoBag = new GeometryBagClass();
            IGeometryCollection buffersGeoColl = (IGeometryCollection) buffersGeoBag;

            foreach (IPolyline subCurve in subCurveList)
                if (subCurve.IsEmpty)
                subCurve.SpatialReference = map.SpatialReference;

            IBufferConstructionProperties bufferConstProp = (IBufferConstructionProperties) bufferConstruction;
            bufferConstProp.EndOption = esriBufferConstructionEndEnum.esriBufferFlat;
            bufferConstruction.ConstructBuffers((IEnumGeometry) subcurvesCollection, bufferSize, buffersGeoColl);
  • 1
    Coding questions are expected to contain code. Please provide an MCVE – Vince Dec 14 '15 at 15:08
  • Where are the geometries stored? I found a KB article about keyset tables and IDs. At least at that point (2008) they were used in a geodatabase to traverse relationship classes. – mkennedy Dec 14 '15 at 16:25
  • 2
    Have you tried setting IBufferConstructionProperties.GenerateCurves = false? Sometimes arcgis chokes on arcs. – Kirk Kuykendall Dec 14 '15 at 21:15
  • mkennedy: the geometries are stored in an Oracle sde. However the buffer geometries are never written to a Feature or shapefile. I keep them in a IGeometryCollection (buffersGeoColl) and only use them in another topological operation later. They are just used as intermediate result in my process. – Chris P Dec 15 '15 at 8:01
  • 1
    I solved it: I added several buffer options ( bufferConstProp.GenerateCurves = false; bufferConstProp.ExplodeBuffers = false; bufferConstProp.UnionOverlappingBuffers = true;) and removed very small polylines from my calculation. Not sure which exactly did the trick but it runs smooth now. Could be that Kirk Kuykendall was right with the arc issue. – Chris P Dec 15 '15 at 9:11

-2147220889 is 80040267 in hexadecimal form. Then I googled for 80040267 ArcObjects and found this:


"(0x80040267) An error occurred during the buffer operation."

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.