ArcEngine将地图上的点元素转为Feature并获得坐标

比如我通过IElement在地图上点了几个点,现在想知道这些点元素在地图上的坐标并存储为.shp图层,怎么做?

第1个回答  2014-12-11
IGraphicsContainer pGraphicsContainer = axMapControl1.ActiveView.GraphicsContainer;
pGraphicsContainer.Reset();
IElement ele = pGraphicsContainer.Next();
while(ele!=null)
{
if (ele.Geometry is IPoint)
{
IFeature feature = pointFeatureClass.CreateFeature();
feature.Shape = ele.Geometry;
//feature.set_Value(0, value);
feature.Store();
}
ele = pGraphicsContainer.Next();
}本回答被提问者和网友采纳
相似回答