ArcGIS Engine開啟shp檔案

2021-08-31 00:03:16 字數 714 閱讀 4363

shp檔案是目前主流的空間資料儲存檔案,ae載入shp檔案可以通過以下兩種方式:

通過工作空間載入

通過mapcontrol的addshapefile方法載入shapefile檔案

通過工作空間載入:

此方法使用於有複雜空間分析操作的情況

用到的引用

using esri.arcgis.geodatabase;  //工作空間使用

using esri.arcgis.datasourcesfile; //開啟shp工作空間工廠使用

using esri.arcgis.carto; //新增到顯示時使用

步驟:

1、開啟視窗獲得檔案路徑

openfiledialog popenfiledialog = new openfiledialog();

popenfiledialog.filter = "shape檔案|*.shp"; //開啟shp檔案

if (popenfiledialog.showdialog() == dialogresult.ok)

}

方法二: 

private void 開啟shp2toolstripmenuitem_click(object sender, eventargs e)

}

ArcGIS Engine開啟柵格檔案

開啟柵格檔案與開啟shp檔案的過程類似,同為從資料所在的資料夾中建立工作空間,再從工作空間中根據檔名開啟資料檔案 用到的引用 using esri.arcgis.geodatabase using esri.arcgis.carto using esri.arcgis.datasourcesrast...

ArcGIS Engine中正確釋放開啟資源

原文 arcgis engine中正確釋放開啟資源 ae中對mdb,sde等資料庫操作時,開啟後卻往往不能及時釋放資源,導致別人操作提示物件被鎖定。很多帖子說了很多原理,看的也煩且不實用,比如一句話概括的用system.runtime.interopservices.marshal.releasec...

ArcGIS Engine中正確釋放開啟資源

原文 arcgis engine中正確釋放開啟資源 ae中對mdb,sde等資料庫操作時,開啟後卻往往不能及時釋放資源,導致別人操作提示物件被鎖定。很多帖子說了很多原理,看的也煩且不實用,比如一句話概括的用system.runtime.interopservices.marshal.releasec...