private void CreatVoronoi()
{
//判定图层是否存在
IMap pMap = axMapControl1.Map;
if (pMap.LayerCount == 0)
{
MessageBox.Show("图层不存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
int k;
for (k = 0; k < axMapControl1.LayerCount; k++)
if (axMapControl1.get_Layer(k).Name == tbrCombo.Items[tbrCombo.SelectedIndex].ToString())
break;
IFeatureLayer pFeatureLayer = (IFeatureLayer)axMapControl1.get_Layer(k);
//IFeatureLayer pFeatureLayer = (IFeatureLayer)pMap.get_Layer(0);
IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
//判断图层的类型是否为点状图层
if (pFeatureClass.ShapeType != esriGeometryType.esriGeometryPoint)
{
MessageBox.Show("图层的要素不是Point类型,请重新选择图层!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;