中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ArcGIS Engine 編輯- IWorkspaceEdit

發布時間:2020-07-24 20:55:28 來源:網絡 閱讀:1426 作者:劉朝樣 欄目:編程語言

IWorkspaceFactory pWsF = new ShapefileWorkspaceFactory();

IFeatureWorkspace pFtWs = pWsF.OpenFromFile(@"E:\arcgis\Engine\數據", 0) as IFeatureWorkspace;

IFeatureClass pFtClass = pFtWs.OpenFeatureClass("edit");

IFeatureLayer pFt = new FeatureLayerClass();

pFt.FeatureClass = pFtClass;
pFt.Name = "畫線";

axMapControl1.Map.AddLayer(pFt as ILayer);

axMapControl1.Refresh();

 

//為了進一步說明Idataset,我特意從下面的代碼

IDataset pDataset = pFtClass as IDataset;

IWorkspace pWs = pDataset.Workspace;

pWsEdit = pWs as IWorkspaceEdit;

pWsEdit.StartEditing(true);


pWsEdit.StartEditOperation();


pBoolStart = pWsEdit.IsBeingEdited();

System.Diagnostics.Stopwatch TimeWatch = new System.Diagnostics.Stopwatch();

TimeWatch.Start();

IFeatureBuffer pFeatureBuffer = pFtClass.CreateFeatureBuffer();


IFeatureCursor pFtCusor = pFtClass.Insert(true);


ESRI.ArcGIS.Geometry.IPolyline polyline = new ESRI.ArcGIS.Geometry.PolylineClass();
ESRI.ArcGIS.Geometry.IPoint pPoint = new ESRI.ArcGIS.Geometry.PointClass();

ESRI.ArcGIS.Geometry.IPoint pPoint2 = new ESRI.ArcGIS.Geometry.PointClass();
for (int i = 0; i < 1000; i++)
{

pPoint.X = 48 + i * 102;

pPoint.Y = 65 + i * 10;

polyline.FromPoint = pPoint;

pPoint2.X = 480 + i * 10;

pPoint2.Y = 615 + i * 102;


polyline.ToPoint = pPoint2;

pFeatureBuffer.Shape = polyline;

pFeatureBuffer.set_Value(2, i);


object pFeatureOID = pFtCusor.InsertFeature(pFeatureBuffer);
}

pFtCusor.Flush();

pWsEdit.StopEditing(true);

axMapControl1.Refresh();
TimeWatch.Stop();

MessageBox.Show(TimeWatch.Elapsed.Milliseconds.ToString());

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

健康| 商城县| 调兵山市| 化德县| 黄梅县| 盐亭县| 永胜县| 静安区| 泸溪县| 丽水市| 邻水| 临西县| 鄂温| 新干县| 武威市| 买车| 老河口市| 瑞安市| 志丹县| 镇平县| 绿春县| 和龙市| 略阳县| 孟津县| 岑巩县| 达日县| 本溪市| 江阴市| 凤阳县| 固镇县| 青浦区| 兴和县| 湘西| 河北省| 乌鲁木齐市| 阜宁县| 海丰县| 荣昌县| 华蓥市| 闸北区| 嘉黎县|