获取某线要素的结点及各结点的坐标值

//提取面百节点坐标度函数问,返回一个答坐标字符回串

private string getShpXY(IPolygon polygon)

{

IPointCollection pc = polygon as IPointCollection;

string strXY="";

string x;

string y;

int sum = 0;

for(int i=0;i<pc.PointCount;i++)

{

if (sum == 0)

{

sum = pc.PointCount;

strXY = sum.ToString();

}

x = pc.get_Point(i).X.ToString();

y = pc.get_Point(i).Y.ToString();

strXY = strXY + "\r\n" + x + "∴答" + y + "∴0.000000";  

}

return strXY;

}

猜你喜欢

转载自www.cnblogs.com/774249302com/p/12890236.html