ArcEngine突擊1 開啟shp檔案

2021-09-02 02:33:07 字數 580 閱讀 4490

詳細教程請見:

shp檔案開啟按鈕

1. 新增按鈕,修改name、text等屬性,雙擊進入click事件

2. 使用mapcontrol空間的addshapefile方法新增,需要傳入檔案位置和檔名引數

檔案位置及檔名引數獲取:

建立檔案開啟視窗openfiledialog物件,設定設定標題title、初始資料夾initialdirectory、開啟檔案型別filter(接受字元         串,|*.type);

如果對話方塊結果正確showdialog()== dialogresult.ok,獲取全域性檔名openshpfile.filename,分割為路徑和檔案         名並返回,pos = filename.lastindexof(「\\」);name.substring(0,pos);name.substring(pos);

private void btn2_click(object sender, eventargs e)

public string openshapefile()

return shpfile;

}

arcengine突擊4 屬性表顯示

詳細教程請見 通過按鈕,跳轉到另乙個視窗,通過選擇圖層顯示屬性表 視窗2內容,combobox 選擇圖層 datagridview 顯示屬性表 視窗1的按鈕單擊事件 如果有圖層,傳入地圖,例項化視窗2並顯示 private void button1 click object sender,event...

ArcEngine開發總結 (1)開啟各種格式檔案

常用到的arcengine載入資料的方法,包括shapefile raster personalgeodatabase filegeodatabase tin cad access資料表 開啟shapefile檔案 檔案路徑 檔名 ifeatureclass public ifeatureclass...

python基礎複習突擊面試(1)

1 map 是 python 內建的高階函式,它接收乙個函式 f 和乙個 list,並通過把函式 f 依次作用在 list 的每個元素上,得到乙個新的 list 並返回。例 def f x return x x print map f,1,2,3,4,5,6,7,8,9 輸出結果 1,4,9,10,...