创建featureclass,为它赋别名,并移动到数据集下

创建featureclass,为它赋别名,并移动到数据集下
 1 if (pOutFtrClass == null)
 2                     {
 3                         //continue;
 4 //创建featureclass
 5                         //得到规范的字段集
 6                         IFields pFields = pFeatureClass.Fields;
 7                         //在目标工作空间中创建要素类
 8                         IFieldChecker fieldChecker = new FieldCheckerClass();
 9                         IEnumFieldError enumFieldError = null;
10                         IFields validatedFields = null;
11                         fieldChecker.ValidateWorkspace = pDataset.Workspace;
12                         fieldChecker.Validate(pFields, out enumFieldError, out validatedFields);                        
13 pOutFtrClass = (pDataset.Workspace as IFeatureWorkspace).CreateFeatureClass((pFeatureClass as IDataset).Name, validatedFields, null, null, esriFeatureType.esriFTSimple, "SHAPE", "");
14 //为此featureclass赋别名
15                         IClassSchemaEdit classedit = pOutFtrClass as IClassSchemaEdit;
16                         string aliasName = pFeatureClass.AliasName;
17                         if (!string.IsNullOrEmpty(aliasName))
18                         {
19                             classedit.AlterAliasName(aliasName);
20                         }
21 //把此featureclass移动到目标数据集下
22                         (pDataset as IDatasetContainer).AddDataset(pOutFtrClass as IDataset);
23 
24                     }
创建featureclass,为它赋别名,并移动到数据集下

另,若要在

在sde的工作空间中.CreateFeatureClass需用 esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB许可

创建featureclass,为它赋别名,并移动到数据集下,布布扣,bubuko.com

创建featureclass,为它赋别名,并移动到数据集下

上一篇:android基站定位程序获取地理位置


下一篇:Android使用属性动画ValueAnimator动态改变SurfaceView的背景颜色