欢迎来到天天文库
浏览记录
ID:21794110
大小:498.00 KB
页数:108页
时间:2018-10-24
《arcgis开发常用源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、技术资料arcgis开发常用源码1.点上生成面的代码if(m_pFeatureLayer.FeatureClass.ShapeType==esriGeometryType.esriGeometryPolygon){IPointCollectionm_pPointCollection=newPolygonClass();objectmissing=Type.Missing;inticount=newFeature.XLIST.Count;if(icount<3)return;for(inti=0;i2、tClass();point.PutCoords(newFeature.XLIST,newFeature.YLIST);m_pPointCollection.AddPoint(point,refmissing,refmissing);}IPolygonm_pPolygon=m_pPointCollectionasIPolygon;if(m_pPolygon==null){System.Windows.Forms.MessageBox.Show("null");return;}else{ITopologicalOperatorpTopo=m_pPolygonas3、ITopologicalOperator;if(pTopo!=null){pTopo.Simplify();}}IWorkspaceEditm_pWorkspaceEdit=m_EngineEditor.EditWorkspaceasIWorkspaceEdit;m_pWorkspaceEdit.StartEditOperation();IFeaturem_pFeature=m_pFeatureLayer.FeatureClass.CreateFeature();m_pFeature.Shape=m_pPolygonasIGeometry;m_pFeature4、.Store();m_pWorkspaceEdit.StopEditOperation();}2.文件的打开保存另存的代码usingSystem;usingSystem.Windows.Forms;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.SystemUI;usingESRI.ArcGIS.Carto;namespaceSaveMapDocument{//////SummarydescriptionforForm1.///publicclassSaveMapDocument:5、System.Windows.Forms.Form{publicSystem.Windows.Forms.TextBoxtxtMapDocument;publicSystem.Windows.Forms.ButtoncmdOpen;publicSystem.Windows.Forms.ButtoncmdSave;publicSystem.Windows.Forms.ButtoncmdSaveAs;privateSystem.Windows.Forms.OpenFileDialogopenFileDialog1;共享知识技术资料privateSystem.Win6、dows.Forms.SaveFileDialogsaveFileDialog1;privateIMapDocumentm_MapDocument;privateESRI.ArcGIS.Controls.AxToolbarControlaxToolbarControl1;privateESRI.ArcGIS.Controls.AxPageLayoutControlaxPageLayoutControl1;privateESRI.ArcGIS.Controls.AxLicenseControlaxLicenseControl1;privateESRI.ArcGI7、S.Controls.AxTOCControlaxTOCControl1;//////Requireddesignervariable.///privateSystem.ComponentModel.Containercomponents=null;publicSaveMapDocument(){////RequiredforWindowsFormDesignersupport//InitializeComponent();////TODO:AddanyconstructorcodeafterInitializeCompo8、nentcall//}///
2、tClass();point.PutCoords(newFeature.XLIST,newFeature.YLIST);m_pPointCollection.AddPoint(point,refmissing,refmissing);}IPolygonm_pPolygon=m_pPointCollectionasIPolygon;if(m_pPolygon==null){System.Windows.Forms.MessageBox.Show("null");return;}else{ITopologicalOperatorpTopo=m_pPolygonas
3、ITopologicalOperator;if(pTopo!=null){pTopo.Simplify();}}IWorkspaceEditm_pWorkspaceEdit=m_EngineEditor.EditWorkspaceasIWorkspaceEdit;m_pWorkspaceEdit.StartEditOperation();IFeaturem_pFeature=m_pFeatureLayer.FeatureClass.CreateFeature();m_pFeature.Shape=m_pPolygonasIGeometry;m_pFeature
4、.Store();m_pWorkspaceEdit.StopEditOperation();}2.文件的打开保存另存的代码usingSystem;usingSystem.Windows.Forms;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.SystemUI;usingESRI.ArcGIS.Carto;namespaceSaveMapDocument{//////SummarydescriptionforForm1.///publicclassSaveMapDocument:
5、System.Windows.Forms.Form{publicSystem.Windows.Forms.TextBoxtxtMapDocument;publicSystem.Windows.Forms.ButtoncmdOpen;publicSystem.Windows.Forms.ButtoncmdSave;publicSystem.Windows.Forms.ButtoncmdSaveAs;privateSystem.Windows.Forms.OpenFileDialogopenFileDialog1;共享知识技术资料privateSystem.Win
6、dows.Forms.SaveFileDialogsaveFileDialog1;privateIMapDocumentm_MapDocument;privateESRI.ArcGIS.Controls.AxToolbarControlaxToolbarControl1;privateESRI.ArcGIS.Controls.AxPageLayoutControlaxPageLayoutControl1;privateESRI.ArcGIS.Controls.AxLicenseControlaxLicenseControl1;privateESRI.ArcGI
7、S.Controls.AxTOCControlaxTOCControl1;//////Requireddesignervariable.///privateSystem.ComponentModel.Containercomponents=null;publicSaveMapDocument(){////RequiredforWindowsFormDesignersupport//InitializeComponent();////TODO:AddanyconstructorcodeafterInitializeCompo
8、nentcall//}///
此文档下载收益归作者所有