欢迎来到天天文库
浏览记录
ID:26640087
大小:303.00 KB
页数:108页
时间:2018-11-28
《arcgis开发常用源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、WORD格式可编辑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、intpoint=newPointClass();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{ITopologica3、lOperatorpTopo=m_pPolygonasITopologicalOperator;if(pTopo!=null){pTopo.Simplify();}}IWorkspaceEditm_pWorkspaceEdit=m_EngineEditor.EditWorkspaceasIWorkspaceEdit;m_pWorkspaceEdit.StartEditOperation();IFeaturem_pFeature=m_pFeatureLayer.FeatureClass.CreateFeature();m_pFeature.4、Shape=m_pPolygonasIGeometry;m_pFeature.Store();m_pWorkspaceEdit.StopEditOperation();}2.文件的打开保存另存的代码usingSystem;usingSystem.Windows.Forms;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.SystemUI;usingESRI.ArcGIS.Carto;namespaceSaveMapDocument{//////Summarydescription5、forForm1.///publicclassSaveMapDocument:System.Windows.Forms.Form{publicSystem.Windows.Forms.TextBoxtxtMapDocument;publicSystem.Windows.Forms.ButtoncmdOpen;publicSystem.Windows.Forms.ButtoncmdSave;publicSystem.Windows.Forms.ButtoncmdSaveAs;privateSystem.Windows.F6、orms.OpenFileDialogopenFileDialog1;专业知识整理分享WORD格式可编辑privateSystem.Windows.Forms.SaveFileDialogsaveFileDialog1;privateIMapDocumentm_MapDocument;privateESRI.ArcGIS.Controls.AxToolbarControlaxToolbarControl1;privateESRI.ArcGIS.Controls.AxPageLayoutControlaxPageLayoutControl17、;privateESRI.ArcGIS.Controls.AxLicenseControlaxLicenseControl1;privateESRI.ArcGIS.Controls.AxTOCControlaxTOCControl1;//////Requireddesignervariable.///privateSystem.ComponentModel.Containercomponents=null;publicSaveMapDocument(){////RequiredforWindowsFo8、rmDesignersupport//InitializeComponent();////TODO:AddanyconstructorcodeafterInitializeComponentc
2、intpoint=newPointClass();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{ITopologica
3、lOperatorpTopo=m_pPolygonasITopologicalOperator;if(pTopo!=null){pTopo.Simplify();}}IWorkspaceEditm_pWorkspaceEdit=m_EngineEditor.EditWorkspaceasIWorkspaceEdit;m_pWorkspaceEdit.StartEditOperation();IFeaturem_pFeature=m_pFeatureLayer.FeatureClass.CreateFeature();m_pFeature.
4、Shape=m_pPolygonasIGeometry;m_pFeature.Store();m_pWorkspaceEdit.StopEditOperation();}2.文件的打开保存另存的代码usingSystem;usingSystem.Windows.Forms;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.SystemUI;usingESRI.ArcGIS.Carto;namespaceSaveMapDocument{//////Summarydescription
5、forForm1.///publicclassSaveMapDocument:System.Windows.Forms.Form{publicSystem.Windows.Forms.TextBoxtxtMapDocument;publicSystem.Windows.Forms.ButtoncmdOpen;publicSystem.Windows.Forms.ButtoncmdSave;publicSystem.Windows.Forms.ButtoncmdSaveAs;privateSystem.Windows.F
6、orms.OpenFileDialogopenFileDialog1;专业知识整理分享WORD格式可编辑privateSystem.Windows.Forms.SaveFileDialogsaveFileDialog1;privateIMapDocumentm_MapDocument;privateESRI.ArcGIS.Controls.AxToolbarControlaxToolbarControl1;privateESRI.ArcGIS.Controls.AxPageLayoutControlaxPageLayoutControl1
7、;privateESRI.ArcGIS.Controls.AxLicenseControlaxLicenseControl1;privateESRI.ArcGIS.Controls.AxTOCControlaxTOCControl1;//////Requireddesignervariable.///privateSystem.ComponentModel.Containercomponents=null;publicSaveMapDocument(){////RequiredforWindowsFo
8、rmDesignersupport//InitializeComponent();////TODO:AddanyconstructorcodeafterInitializeComponentc
此文档下载收益归作者所有