private void buttonExecute_Click(object sender, EventArgs e)
{
try
{
//---------------------------检查拓扑错误-------------------------------------
string inPath = GDBFilePath;
//string ouPath = textBoxOutput.Text;
if (!System.IO.File.Exists(inPath))
{
checkTopologyError(inPath, temDSName);
MessageBox.Show("true");
}
else
MessageBox.Show("没有文件");
//------------------------------------------------------------------------------
}
catch (Exception ex)
{
MessageBox.Show("触发异常操作:" + ex.ToString(), "执行失败");
}
}
/// <summary>
/// 检查要素层中存在的拓扑错误
/// </summary>
/// <param name="wsPath">工作空间名称</param>
/// <param name="dsPath">数据集名称</param>
public void checkTopologyError(string wsPath, string dsPath)
{
// Open the workspace and the required datasets. FileGDBWorkspaceFactoryClass
//Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.AccessWorkspaceFactory");
Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactoryClass");
//ESRI.ArcGIS.DataSourcesGDB
IWorkspaceFactory workspaceFactory =
ArcEngine 拓扑
最新推荐文章于 2021-05-20 15:32:13 发布
本文深入探讨了ArcEngine中的拓扑概念,包括拓扑规则、数据预处理、拓扑错误检查与修复,以及如何在GIS应用中利用拓扑提高数据质量。
摘要由CSDN通过智能技术生成