欢迎来到天天文库
浏览记录
ID:32518501
大小:569.30 KB
页数:173页
时间:2019-02-10
《c#开发常用源码》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、ArcGISEngine开发常用源码2011-6-24ArcGISEngine开发常用源码1.点上生成面的代码if(m_pFeatureLayer.FeatureClass.ShapeType==esriGeometryType.esriGeometryPolygon){IPointCollectionm_pPointCollection=newPolygonClass();objectmissing=Type.Missing;inticount=newFeature.XLIST.Count;if(icount<3
2、)return;for(inti=0;i3、MessageBox.Show("null");return;}else{ITopologicalOperatorpTopo=m_pPolygonasITopologicalOperator;if(pTopo!=null){pTopo.Simplify();}}IWorkspaceEditm_pWorkspaceEdit=m_EngineEditor.EditWorkspaceasIWorkspaceEdit;m_pWorkspaceEdit.StartEditOperation();IFeaturem_pFeat4、ure=m_pFeatureLayer.FeatureClass.CreateFeature();m_pFeature.Shape=m_pPolygonasIGeometry;m_pFeature.Store();m_pWorkspaceEdit.StopEditOperation();}2.文件的打开保存另存的代码usingSystem;usingSystem.Windows.Forms;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.SystemUI;usingESRI5、.ArcGIS.Carto;namespaceSaveMapDocument{//////SummarydescriptionforForm1.///publicclassSaveMapDocument:System.Windows.Forms.Form{publicSystem.Windows.Forms.TextBoxtxtMapDocument;publicSystem.Windows.Forms.ButtoncmdOpen;publicSystem.Windows.Fo6、rms.ButtoncmdSave;publicSystem.Windows.Forms.ButtoncmdSaveAs;privateSystem.Windows.Forms.OpenFileDialogopenFileDialog1;privateSystem.Windows.Forms.SaveFileDialogsaveFileDialog1;privateIMapDocumentm_MapDocument;privateESRI.ArcGIS.Controls.AxToolbarControlaxTool7、barControl1;privateESRI.ArcGIS.Controls.AxPageLayoutControlaxPageLayoutControl1;privateESRI.ArcGIS.Controls.AxLicenseControlaxLicenseControl1;privateESRI.ArcGIS.Controls.AxTOCControlaxTOCControl1;//////Requireddesignervariable.///privateSyst8、em.ComponentModel.Containercomponents=null;publicSaveMapDocument(){////RequiredforWindowsFormDesignersupport//InitializeComponent();////TODO:AddanyconstructorcodeafterInitializeCom
3、MessageBox.Show("null");return;}else{ITopologicalOperatorpTopo=m_pPolygonasITopologicalOperator;if(pTopo!=null){pTopo.Simplify();}}IWorkspaceEditm_pWorkspaceEdit=m_EngineEditor.EditWorkspaceasIWorkspaceEdit;m_pWorkspaceEdit.StartEditOperation();IFeaturem_pFeat
4、ure=m_pFeatureLayer.FeatureClass.CreateFeature();m_pFeature.Shape=m_pPolygonasIGeometry;m_pFeature.Store();m_pWorkspaceEdit.StopEditOperation();}2.文件的打开保存另存的代码usingSystem;usingSystem.Windows.Forms;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.SystemUI;usingESRI
5、.ArcGIS.Carto;namespaceSaveMapDocument{//////SummarydescriptionforForm1.///publicclassSaveMapDocument:System.Windows.Forms.Form{publicSystem.Windows.Forms.TextBoxtxtMapDocument;publicSystem.Windows.Forms.ButtoncmdOpen;publicSystem.Windows.Fo
6、rms.ButtoncmdSave;publicSystem.Windows.Forms.ButtoncmdSaveAs;privateSystem.Windows.Forms.OpenFileDialogopenFileDialog1;privateSystem.Windows.Forms.SaveFileDialogsaveFileDialog1;privateIMapDocumentm_MapDocument;privateESRI.ArcGIS.Controls.AxToolbarControlaxTool
7、barControl1;privateESRI.ArcGIS.Controls.AxPageLayoutControlaxPageLayoutControl1;privateESRI.ArcGIS.Controls.AxLicenseControlaxLicenseControl1;privateESRI.ArcGIS.Controls.AxTOCControlaxTOCControl1;//////Requireddesignervariable.///privateSyst
8、em.ComponentModel.Containercomponents=null;publicSaveMapDocument(){////RequiredforWindowsFormDesignersupport//InitializeComponent();////TODO:AddanyconstructorcodeafterInitializeCom
此文档下载收益归作者所有