AnsweredAssumed Answered

Problem with merging features created using ICircularArc

Question asked by xyknewtry on Jun 25, 2012
Latest reply on Jun 25, 2012 by xyknewtry
I need a tool to creat buffer around a point, which is a typicall round buffer, but with one side cut depending on some parameters. Looks like ICircularArc is the perfect class. I get the tool to creat all the buffers as I need and output to either a shapefile or database. However, as a last step I need to merge all the individual buffers to creat a single feature, for which a manual operation is convenient enough. But as soon as I merge them, everything disappears. Doesn't matter if the output is in a GDB or shapefile. Anyone has idea what is going on and what I can do to fix the problem? I'm including the code snippet I used for creating the individual buffers, and a shapefile which if you merge all features, everything will disappear.

Interestingly, if the geometries of all features are somewhat touched before merging, for example, all polygons selected and cut, merging would work as expected.

Thanks in advance!

... IPoint point = feature.Shape as IPoint;  if (!CompareSpatialRefs(spatialReferenceOut,spatialReferenceSiren))                     point.Project(spatialReferenceOut);                 ICircularArc circArc = new CircularArcClass();                 ILine2 lineClosePolygon = new LineClass(); ISegmentCollection ring1 = new RingClass();                 ring1.AddSegment(circArc as ISegment, ref missing, ref missing);                 ring1.AddSegment(lineClosePolygon as ISegment, ref missing, ref missing);                  IPolygon4 polygon = new PolygonClass();                 polygon.SpatialReference = spatialReferenceOut;                  IGeometryCollection geometryCollection = polygon as IGeometryCollection;                 geometryCollection.AddGeometry(ring1 as IGeometry, ref missing, ref missing); circArc.PutCoordsByAngle(point, start_angle, central_angle_span, radius * HorizontalUnit_FT2OutputUnit); lineClosePolygon.PutCoords(circArc.ToPoint, circArc.FromPoint); geometryCollection.GeometriesChanged(); outputFeatureBuffer.Shape = polygon;                 outputFCcursor.InsertFeature(outputFeatureBuffer); ...