使用Iidentify接口,Feature属性没有Get访问器,如何获取到查询到的Feature

IIdentify pIdentify = needLayer as IIdentify;

IArray pIDs = pIdentify.Identify((IGeometry)pp);

if (pIDs == null || pIDs.Count == 0) { return; }

//取第一个实体

IFeatureIdentifyObj pFeatIdObj = pIDs.get_Element(0) as IFeatureIdentifyObj;

// 1:获得IFeature对象

IFeature pFea= pFeatIdObj.Feature

其中的Feature属性没有Get访问器,我如何获取到查询到的Feature
已邀请:

岳官印

赞同来自:

【解决办法】:
使用IRowIdentifyObject 代替IFeatureIdentifyObj
for (int i = 0; i < pArray.Count; i++) 

IRowIdentifyObject pRowIdentifyObject = pArray.get_Element(i) as IRowIdentifyObject; 
IFeature pFeature2 = pRowIdentifyObject.Row as IFeature; 
MessageBox.Show(pFeature2.Shape.GeometryType.ToString()); 
}

要回复问题请先登录注册