Hi,
I have written a C# tool that extracts the points of a given polygon and modifies some of the z-values. The result will then be used to create a new polygon feature.
private IPolygon GetPolygonFromShape(IFeature feature, bool hasz)
{
IPointCollection4 pcol1 = (IPointCollection4)feature.Shape;
for (int i = 0; i < pcol1.PointCount; i++)
{
// do something.....
}
IPolygon polygon = pcol1 as IPolygon;
return polygon;
}
I have now the problem that the original feature is sometimes a circle and the extracted PointCollection contains only 2 points. When I try to create the new polygon I get of course an exception 'The number of points is less than required for feature'.
How can I find out that a feature in a polygon class is a circle or a cicular arc? And how do I create the new feature as a circle from the 2 points?
Thanks an regards,
Thomas Waenke