欢迎来到天天文库
浏览记录
ID:48422594
大小:1.55 MB
页数:28页
时间:2020-01-25
《AE邻近分析及渲染代码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、.实验六:基于最邻近模型的服务区分析题目要求:........1)Form1主界面搭建:2)Form2用于邻近分析和唯一值渲染的界面搭建:*要注意的几点:..2.1首先将实验数据存放在系统工程文件夹>bin>Debug文件夹中,如图:..2.2后面需要添加一个EngineFunction.cs类:结果如下:..2.3如果引用命名空间时出现了红波浪线,则需在解决方案资源管理器中添加引用,选择.NET环境下的以ESRI.ArcGIS开头的命名空间的引用,则代码中的红波浪则会消除,如图:3)如果用于Visual2010+ArCGIS10.0所组成的ArcGISEngine中:Prog
2、ram.cs中需添加一句话用于格式转换:..usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Windows.Forms;namespace六{staticclassProgram{[STAThread]staticvoidMain(){Application.EnableVisualStyles();ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);Application.SetComp
3、atibleTextRenderingDefault(false);Application.Run(newForm1());}}}4)Form1代码:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingESRI.ArcGIS.Controls;usingESRI.ArcGIS.Carto;
4、usingESRI.ArcGIS.Geodatabase;usingSystem.IO;usingESRI.ArcGIS.Display;usingESRI.ArcGIS.esriSystem;usingESRI.ArcGIS.DataSourcesFile;usingESRI.ArcGIS.Geometry;namespace六{publicpartialclassForm1:Form{publicForm1(){..InitializeComponent();}privatevoidForm1_Load(objectsender,EventArgse){}privatevo
5、id文件tToolStripMenuItem_Click(objectsender,EventArgse){IWorkspaceFactorypWorkspaceFactory=newShapefileWorkspaceFactoryClass();stringShpPath=Application.StartupPath+@"服务区分析数据";IWorkspacepWorkspace=pWorkspaceFactory.OpenFromFile(ShpPath,0);IFeatureWorkspacepFeatureWorkspace=pWorkspaceasIFeatur
6、eWorkspace;IFeatureClasspFeat1=pFeatureWorkspace.OpenFeatureClass("cubsoxaddr_prj.shp");IFeatureLayerpFLayerPoint=newFeatureLayerClass();pFLayerPoint.FeatureClass=pFeat1;pFLayerPoint.Name=pFeat1.AliasName;ILayerpLayerPoint=pFLayerPointasILayer;IFeatureClasspFeat2=pFeatureWorkspace.OpenFeatur
7、eClass("chitrt_cent.shp");IFeatureLayerpFLayerPeoplePoint=newFeatureLayerClass();pFLayerPeoplePoint.FeatureClass=pFeat2;pFLayerPeoplePoint.Name=pFeat2.AliasName;ILayerpLayerPeoplePoint=pFLayerPeoplePointasILayer;IFeatureClasspFCLine=pFeatureWorkspa
此文档下载收益归作者所有