AE中如何由IFeature 如何获取所对应的FeatureClass

AE中如何由IFeature 如何获取所对应的FeatureClass,第1张

private void OnDeleteFeatureMethod(object o) { IFeature pFeature = o as IFeature; IFeatureClass pFeatureClass = pFeatureClass as IFeatureClass; for (int i = 0; i < axMapControl1MapLayerCount;i++ ) { IFeatureLayer iFeatureLayer = axMapControl1get_Layer(i) as IFeatureLayer; IFeatureClass iFeatureCla = iFeatureLayerFeatureClass; if (iFeatureCla == pFeatureClass) { IWorkspace pWorkSpace = m_EngineEditorEditWorkspace; textBox3Text += " *** 作的文件全路径:" + pWorkSpacePathName + "\\" + axMapControl1get_Layer(i)Name + "shp " + "\r\n"; break; } } if (pFeatureShapeGeometryType == esriGeometryTypeesriGeometryPoint) { IGeometry iGe = pFeatureShape; IPoint ipo = new PointClass(); ipo = iGe as IPoint; int a = 0; int b = 0; axMapControl1FromMapPoint(ipo, ref a, ref b); textBox3Text += "删除的点的ID号:" + pFeatureOID + ",坐标:(" + a + "," + b + ")" + "\r\n"; } else if (pFeatureShapeGeometryType == esriGeometryTypeesriGeometryPolygon) { textBox3Text += "删除的多边形对象的ID号:" + pFeatureOID + ",坐标:"; IPolygon pPolygon = (IPolygon)pFeatureShape; int a = 0; int b = 0; //把该feature强制转换为一个点的集合,再取点的坐标 IPointCollection pPointCollection = pPolygon as IPointCollection; for (int i = 0; i < pPointCollectionPointCount - 1; i++) { IPoint ipo = pPointCollectionget_Point(i); axMapControl1FromMapPoint(ipo, ref a, ref b); textBox3Text += "(" + a + "," + b + ")" + "\t"; } textBox3Text += "\r\n"; } else if (pFeatureShapeGeometryType == esriGeometryTypeesriGeometryPolyline) { textBox3Text += "删除的线对象的ID号:" + pFeatureOID + ",其坐标:"; IPolyline pPolygon = (IPolyline)pFeatureShape; int a = 0; int b = 0; //把该feature强制转换为一个点的集合,再取点的坐标 IPointCollection pPointCollection = pPolygon as IPointCollection; for (int i = 0; i < pPointCollectionPointCount; i++) { IPoint ipo = pPointCollectionget_Point(i); axMapControl1FromMapPoint(ipo, ref a, ref b); textBox3Text += "(" + a + "," + b + ")" + "\t"; } textBox3Text += "\r\n"; } axMapControl1ActiveViewPartialRefresh(esriViewDrawPhaseesriViewGeography, null, null); }

以上就是关于AE中如何由IFeature 如何获取所对应的FeatureClass全部的内容,包括:AE中如何由IFeature 如何获取所对应的FeatureClass、、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/9402356.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存