ArcGIS Engine要素屬性表編輯

2021-08-31 23:28:03 字數 823 閱讀 8989

屬性表字段新增

要素屬性編輯是地理資訊系統的基本功能,為要素新增字段使用ifieldedit介面ifield介面fieldclass類。

由於ifield欄位是唯讀的,要修改字段,必須將其轉化為ifieldedit介面型別,再對其進行賦值。

ifield pfield = new fieldclass();

ifieldedit pfieldedit = pfield as ifieldedit;

pfieldedit.name_2 = fieldname;

pfieldedit.aliasname_2 = alias;

pfieldedit.type_2 = esrifieldtype.esrifieldtypestring;

pfieldedit.length_2 = 20;

ptable.addfield(pfield);

屬性表賦值

使用irow介面

string value = row.cells[j].value.tostring();

prow.set_value(j, value);

prow.store();

irow介面提供set_value方法,用於設定和修改屬性,其第乙個引數為屬性的序號,第二個引數為屬性值。

ArcGIS Engine中刪除要素的幾種方法總結

原文 arcgis engine中刪除要素的幾種方法總結 csharp view plain copy print?通過ifeature.delete方法刪除要素 要素類 查詢條件 public static void deletefeaturebyifeature ifeatureclass pf...

ArcGIS Engine中刪除要素的幾種方法總結

原文 arcgis engine中刪除要素的幾種方法總結 通過ifeature.delete方法刪除要素 要素類 查詢條件 public static void deletefeaturebyifeature ifeatureclass pfeatureclass,string strwherecl...

arcgis engine中對要素類進行空間查詢

假設有個要素類是所有的面,現在想查詢哪個面包含了特定的座標點.這樣可以用空間過濾器,進行空間查詢來做.根據要查詢的座標構造乙個點 ipoint targetpoint new pointclass targetpoint.putcoords x,y 構造空間過濾器 ispatialfilter sp...