IWorkspaceFactory wsf = new ShapefileWorkspaceFactory(); IWorkspace pWorkspace = wsf.Open(filePath, 0) ;//filePath为shapefile所在的文件夹 IFeatureWorkspace pFeatureWorkspace = pWorkspace ; IFeatureClass pFeatureClass = pFeatureWorkspace.OpenFeatureClass("parcels");//parcels为shapefile文件名pacels.shp
时间: 2024-12-16 00:37:49