C#打开外部程序

摘要: In C# you can use the process.start() method to start another application, and then if you want to execute the applications with some parameters, then you may want to use the ShellExecute method which is get from the dll file named "shell32.dll", and you can use the DllImport() method to g 阅读全文
posted @ 2013-03-23 00:41 很遗憾我不是 阅读(299) 评论(0) 推荐(0) 编辑

IDL + AE + C#

摘要: Today that when I work on a power point to show how one project will use the idldrawwidget COM dll, to analysis the raster, I thought about that there is many successful functions in IDL library, and if you just have some data from the feature and you want to analysis using the tools in IDL, like cl 阅读全文
posted @ 2013-03-21 00:57 很遗憾我不是 阅读(393) 评论(0) 推荐(0) 编辑

DataGridView AllowUserToAddRows

摘要: If you set the datagridview.allowuseraddrows = true, then there will be a row with value null, and then when you traversal the rows of the datagridview.rows[X].cells[Y].value, there will be a exception, nullreferenceexception.Keep in mind that, if you don't want the user to add row, set the allo 阅读全文
posted @ 2013-03-21 00:52 很遗憾我不是 阅读(565) 评论(0) 推荐(0) 编辑

添加、复制、删除feature

摘要: 1、插入/// <summary>///向featureclass中批量插入features ,批量插入features,用buffer的方法,要比循环一个个Store的方法快///</summary>/// <param name="pFeatureClass">操作数据所在的IFeatureClass</param>private void InsertFeatures( IFeatureClass pFeatureClass , List< IGeometry> pGeos ){ IFeatureBuffer 阅读全文
posted @ 2013-03-21 00:45 很遗憾我不是 阅读(2912) 评论(0) 推荐(0) 编辑

C# AE 打开本地数据

摘要: 先看一下GeoDatabase核心结构模型图: 1 工作空间工厂WorkspaceFactory对象 WorkspaceFactory是GeoDatabase的入口,是一个抽象类,拥有很多子类,例如SdeWorkspaceFactory, AccessWorkspaceFactory, ShapfileWorkspaceFactory CadWorkspaceFactory等 IWorkspaceFactory接口定义了所有工作空间对象的一般属性和方法 public IWorkspaceName Create (string parentDirectory,string Name,IPrope 阅读全文
posted @ 2013-03-20 15:27 很遗憾我不是 阅读(9439) 评论(0) 推荐(3) 编辑

C# DataTable操作

摘要: protectedvoidPage_Load(objectsender,EventArgse) { //①CreateaDataTable DataTabledt=newDataTable("Table_AX"); //②AddcolumnsforDataTable //Method1 dt.Columns.Add("column0",System.Type.GetType("System.String")); //Method2 DataColumndc=newDataColumn("column1",Syste 阅读全文
posted @ 2013-03-10 21:26 很遗憾我不是 阅读(390) 评论(0) 推荐(0) 编辑

K-Means Clustering

摘要: http://www.cnblogs.com/henyihanwobushi/admin/EditPosts.aspx?opt=1K均值聚类 阅读全文
posted @ 2013-03-07 23:55 很遗憾我不是 阅读(171) 评论(0) 推荐(0) 编辑

修改Feature的属性表的值

摘要: 首先一定要获取Featureclass,利用Featureclass获取IWorkspace和IWorkspaceEdit: IWorkspace workspace = ((IDataset)pFeatureClass).Workspace; IWorkspaceEdit workspaceEdit = workspace as IWorkspaceEdit;然后开启编辑状态: bool startEdit = workspaceEdit.IsBeingEdited(); if (!startEdit) { workspaceEdit.StartEditing(false); } works 阅读全文
posted @ 2013-03-07 01:31 很遗憾我不是 阅读(4985) 评论(0) 推荐(0) 编辑

C#, HashTable

摘要: 1、HashTable定义System.Collections. Hashtable类表示键/值对的集合,这些键/值对根据键的哈希代码进行组织, 每个元素都是一个存储在 DictionaryEntry 对象中的键/值对。键不能为 null,但值可以。2.优点1、通过Key快速查找。2、Hashtable 是线程安全的。3. Hashtable的构造器构造器函数注释Public Hashtable () 使用默认的初始容量(容量大小为0)、加载因子、哈希代码提供程序和比较器来初始化 Hashtable 类的新的空实例。publicHashtable (IDictionary) 通过将指定字典中的 阅读全文
posted @ 2013-03-05 16:08 很遗憾我不是 阅读(5454) 评论(0) 推荐(0) 编辑

AE Featureclass 添加字段

摘要: 现在需要对已有的要素图层添加字段,尝试以下代码: IFeatureClass pFc=((IFeatureLayer)lyrRec).FeatureClass;IFieldsEdit fldsE=pFc.FieldsasIFieldsEdit;IField fld=newFieldClass();IFieldEdit2 fldE=fldasIFieldEdit2;fldE.Type_2=esriFieldType.esriFieldTypeString;fldE.Name_2="XXX";ic.AddField(fld);intidTest=gpsFc.Fields.Fin 阅读全文
posted @ 2013-03-05 15:35 很遗憾我不是 阅读(2620) 评论(0) 推荐(0) 编辑