Arcobjects ConstructBuffers produces Error -2147220889

المشرف العام

Administrator
طاقم الإدارة
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) { subCurveList.Remove(subCurve); } subCurve.SpatialReference = map.SpatialReference; subCurve.PrepareForTopologicalOperation();//simplify subcurvesCollection.AddGeometry(subCurve); } IBufferConstructionProperties bufferConstProp = (IBufferConstructionProperties) bufferConstruction; bufferConstProp.EndOption = esriBufferConstructionEndEnum.esriBufferFlat; bufferConstruction.ConstructBuffers((IEnumGeometry) subcurvesCollection, bufferSize, buffersGeoColl);

أكثر...
 
أعلى