IWorkspaceFactory pWsF = new ShapefileWorkspaceFactory();
讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對(duì)這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡(jiǎn)單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:域名注冊(cè)、雅安服務(wù)器托管、營(yíng)銷軟件、網(wǎng)站建設(shè)、渭南網(wǎng)站維護(hù)、網(wǎng)站推廣。IFeatureWorkspace pFtWs = pWsF.OpenFromFile(@"E:\arcgis\Engine\數(shù)據(jù)", 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();
//為了進(jìn)一步說明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());
創(chuàng)新互聯(lián)www.cdcxhl.cn,專業(yè)提供香港、美國(guó)云服務(wù)器,動(dòng)態(tài)BGP最優(yōu)骨干路由自動(dòng)選擇,持續(xù)穩(wěn)定高效的網(wǎng)絡(luò)助力業(yè)務(wù)部署。公司持有工信部辦法的idc、isp許可證, 機(jī)房獨(dú)有T級(jí)流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確進(jìn)行流量調(diào)度,確保服務(wù)器高可用性。佳節(jié)活動(dòng)現(xiàn)已開啟,新人活動(dòng)云服務(wù)器買多久送多久。