AnsweredAssumed Answered

Create buffer for polyline and points inside particular polygon

Question asked by mayur.patel on Jun 10, 2018

Hi, I am new to C#. I know this must be silly question. What I exactly want to do is after selecting a polygon, the polyline and points which resides within it must be captured and need to buffer them and store it in new FeatureClass. 
I am selecting the polygon and able to capture the polyline and points which resides within it. And using ITopologicalOperation, I am buffering those polyline and points but somehow I don't see the buffer created around them but able to see feature created.

 

My code to create buffer around them is :
IGeometry buffGeometry = priUGFeature.ShapeCopy;
ITopologicalOperator topologicalOperator = buffGeometry as ITopologicalOperator;
IPolygon polygon = topologicalOperator.Buffer(1000) as IPolygon;
priUGFeature = priUGFtClass.CreateFeature();
priUGFeature.Store();

#Note: priUGFtClass is my featureClass. How can we provide units like mile, meter, etc. to buffer distance? I have no idea for this.

Also, I want to dissolve all buffers and the clipped them with polygon.
Please guide me in this.

I am using Visual Studio 2017 and .NET Framework 4.5 and console application it is.

I have come across the concept of 'In_Memory' but didn't find anything in C#.

Outcomes