手机版

东华理工GIS二次开发实验报告(9)

发布时间:2021-06-06   来源:未知    
字号:

65 string shapefilename = "Shape"; 66 _2 = shapefilename; 67 fedit.AliasName_2 = "形状";

68 fedit.Type_2 = esriFieldType.esriFieldTypeGeometry; 69 fedit.GeometryDef_2 = geodefedit; 70 fieldsedit.AddField((IField)fedit); 71

72 IFeatureClass ftclass;

73 ftclass = ftworkspace.CreateFeatureClass 74 (sfilename, fields, null, null, 75

esriFeatureType.esriFTSimple, "Shape", "");

76 if (ftclass == null) 77 return null; 78 return ftclass; 79 } 80

81 public bool addfeaturetomap 82

83 {

84 if (ftclass == null || slayername == null) 85 return false;

86 IFeatureLayer ftlayer = new FeatureLayerClass(); 87 ftlayer.FeatureClass = ftclass; 88 = slayername; 89 mmap.AddLayer(ftlayer as ILayer); 90 IActiveView act = mmap as IActiveView; 91 act.Refresh(); 92 return true; 93 } 94

95 public DataTable getcontNames() 96 {

97 ILayer layer = getlayerbyname("Continents");

98 IFeatureLayer featurelayer = layer as IFeatureLayer; 99 if (featurelayer == null) 100 return null; 101 IFeature feature;

102 IFeatureCursor featureCursor = featurelayer.Search(null, false); 103 feature = featureCursor.NextFeature(); 104 if(feature == null) 105 return null;

106 DataTable datatable = new DataTable(); 107 DataColumn datacolum = new DataColumn(); 108 datacolum.ColumnName = "序号";

(IFeatureClass ftclass, string slayername)

东华理工GIS二次开发实验报告(9).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)