地图屏幕坐标转地图坐标
IPoint point = this.m_hookHelper.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);
IIdentify identify = FeatureLayer as IIdentify;
if (identify == null)
{
continue;
}
IPoint point2 = this.m_hookHelper.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(X, Y);
IArray array = identify.Identify(point2);
if (array == null || array.Count<1)
{
continue;
}
for (int i = 0; i < array.Count; i++)
{
IRowIdentifyObject row = (IRowIdentifyObject)array.get_Element(i);
if (row == null)
continue;
IFeature pFeature = row.Row as IFeature;
if (pFeature != null)
{
if (Geometry == null)
{
Geometry = pFeature.ShapeCopy;
}
else
{
ITopologicalOperator topological = Geometry as ITopologicalOperator;
if (!topological.IsSimple)
{
topological.Simplify();
}
Geometry = topological.Union(pFeature.ShapeCopy) as IGeometry;
}
}
}