内蒙古java团队

j2se,j2ee开发组
posts - 139, comments - 212, trackbacks - 0, articles - 65
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

AE数据转换的代码

Posted on 2007-03-08 16:47 帅子 阅读(1157) 评论(0)  编辑  收藏 所属分类: j2se技术专区
AE数据转换的代码

private void ExportToShapefile(IFeatureClass fc, IWorkspace outWorkspace)
  {

   IDataset inDataSet = fc as IDataset;
   IFeatureClassName inFCName = inDataSet.FullName as IFeatureClassName;
   IWorkspace inWorkspace = inDataSet.Workspace; 
   
   IDataset outDataSet = outWorkspace as IDataset;
   IWorkspaceName outWorkspaceName = outDataSet.FullName as IWorkspaceName;
   
   IFeatureClassName outFCName = new FeatureClassNameClass();
   IDatasetName dataSetName = outFCName as IDatasetName;
   dataSetName.WorkspaceName = outWorkspaceName;
   dataSetName.Name = fc.AliasName.ToString();
   

   IFieldChecker fieldChecker = new FieldCheckerClass();
   fieldChecker.InputWorkspace = inWorkspace;
   fieldChecker.ValidateWorkspace = outWorkspace;

   IFields fields = fc.Fields;
   IFields outFields = null;
   IEnumFieldError enumFieldError = null;
   fieldChecker.Validate(fields,out enumFieldError,out outFields);
   
   IFeatureDataConverter featureDataConverter = new FeatureDataConverterClass();
   featureDataConverter.ConvertFeatureClass(inFCName,null,null,outFCName,null,outFields,"",100,0);

  }


只有注册用户登录后才能发表评论。


网站导航: