bhavanisankarnimmala

Union the Polygons using arcobjects

Blog Post created by bhavanisankarnimmala on May 14, 2018

private IGeometry unionPolygons(IPolygon4 p1, IPolygon4 p2)

{

//simplify the inputs

(p1 as ITopologicalOperator3).IsKnownSimple_2 = false;

(p1 as ITopologicalOperator3).Simplify();

(p2 as ITopologicalOperator3).IsKnownSimple_2 = false;

(p2 as ITopologicalOperator3).Simplify();

//union

IGeometry result = (p1 as ITopologicalOperator3).Union(p2);

//simplify the output

(result as ITopologicalOperator3).IsKnownSimple_2 = false;

(result as ITopologicalOperator3).Simplify();

return result;

}

Outcomes