ArcGIS读取gdb内要素
IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
IWorkspace workspace = workspaceFactory.OpenFromFile(@”F:/testData/test.gdb”, 0);
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
IFeatureDataset featureDataset = featureWorkspace.OpenFeatureDataset(“topo”);
IFeatureClass cxghFC = featureWorkspace.OpenFeatureClass(“cxghph”);
IFeatureClass tdlyFC = featureWorkspace.OpenFeatureClass(“tdly”);
———————————————————————————————————————————————-
读取数据集用的是 featureWorkspace.OpenFeatureDataset(“topo”);读取要素类用的是featureWorkspace.OpenFeatureClass(“cxghph”);那这个cxghph要素是test.gdb下的还是数据集topo下的呢?
在ArcMap里面手动导入的时候发现,如果test.gdb底下有名为 cxghph的要素类,那么topo要素集里面是无法再导入同名要素的。
同样,要素集内存在,gdb内是无法再导入同名要素,会提示 表已存在 。
微信关注 奔跑的GISer 获取更多资源
转载自:https://blog.csdn.net/gis0911178/article/details/52789798