mayur.patel

Dissolve the feature after applying buffer to featureClass

Discussion created by mayur.patel on Jun 18, 2018

Hi, I am new to ArcObject C#. I want to dissolve the feature of the featureClass after applying buffer to it. Below is my code. 

ISpatialFilter spatialFilter = new SpatialFilter();
spatialFilter.Geometry = areafeature;
spatialFilter.GeometryField = priUGFtClass.ShapeFieldName;
spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;

 

IFeatureCursor priUGCursor = priUGFtClass.Search(spatialFilter, true);         // priUGFTClass is my featureClass
IFeature priUGFeature = null;
IGeometry buffGeometry;
ITopologicalOperator topologicalOperator, topologicalOperator1;
IGeometry polygon, geometry;

 

while ((priUGFeature = priUGCursor.NextFeature()) != null)
{
Console.WriteLine("Total Fields before buffer : "+priUGFeature.Fields.FieldCount);
buffGeometry = priUGFeature.ShapeCopy;
topologicalOperator = buffGeometry as ITopologicalOperator;
polygon = topologicalOperator.Buffer(0.00004);

priUGFeature = shapeFileClass.CreateFeature();
priUGFeature.Shape = polygon;
topologicalOperator1 = priUGFeature.ShapeCopy as ITopologicalOperator;
geometry = topologicalOperator1.Intersect(areafeature, esriGeometryDimension.esriGeometry2Dimension);

priUGFeature.Shape = geometry;
priUGFeature.Store();  // I am storing feature in FeatureClass
// Console.WriteLine("Total fields : " + priUGFeature.Fields.FieldCount); */
}

After applying buffer to feature, at the same time I want to dissolve that featureClass. I googled but didn't find anything. 
I also want to Union all buffered feature.


Thanks in advance.

Outcomes