ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:366.94KB ,
资源ID:9204695      下载积分:12 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/9204695.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(湘潭市雨湖区酒店分布电子地图软件设计报告.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

湘潭市雨湖区酒店分布电子地图软件设计报告.docx

1、湘潭市雨湖区酒店分布电子地图软件设计报告湘潭市雨湖区酒店分布电子地图软件设计实习报告实习目的了解地图的功能和地图软件制作的方法,实现简单的地图制作。实习内容制作一个简单的地图软件,实现地图的导航和查询统计功能。实习步骤1. 准备矢量化完成湘潭市雨湖区酒店分布的电子地图,如下图:2. 安装好Arcengine 9.3 运行时和Arcengine 9.3 SDK for .Net,在Visual Studio 2008中新建一个Windows应用程序,完成主界面Form1如下图,并设置好各种属性:3. 添加一个窗体Form2,作为查询和统计的信息输入对话框,如下图所示:4. 编写程序实现功能。代码

2、如下:Form1的代码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using ESRI.ArcGIS.Carto;using ESRI.ArcGIS.Controls;using ESRI.ArcGIS.Display;using ESRI.ArcGIS.Geometry;using ES

3、RI.ArcGIS.esriSystem;using ESRI.ArcGIS.Output;using ESRI.ArcGIS.SystemUI;using ESRI.ArcGIS.Analyst3D;using ESRI.ArcGIS.GlobeCore;using ESRI.ArcGIS.DisplayUI;using ESRI.ArcGIS.GeoAnalyst;using ESRI.ArcGIS.Geodatabase;namespace HotelMap public partial class Form1 : Form public Form1() InitializeCompon

4、ent(); private void Form1_Load(object sender, EventArgs e) this.Text = 湘潭市雨湖区酒店分布电子地图; this.axToolbar.Height = this.axMap.Height - 2; this.axTOC.SetBuddyControl(this.axMap); this.axToolbar.SetBuddyControl(this.axMap); this.axMap.LoadMxFile(F:maphotel.mxd); /地图导航工具条长度变化 private void axMap_Resize(obje

5、ct sender, EventArgs e) /this.axToolbar.Location.X = this.axMap.Location.X + 1; /this.axToolbar.Location.Y = this.axMap.Location.Y + 1; this.axToolbar.Height = this.axMap.Height - 20; /打开地图 private void OpenmapItem_Click(object sender, EventArgs e) OpenFileDialog f = new OpenFileDialog(); f.Title =

6、打开地图; f.Multiselect = false; f.Filter = Arcmap地图文档(*.mxd)|*.mxd; if (f.ShowDialog() = DialogResult.OK) try this.axMap.LoadMxFile(f.FileName); catch (Exception ex) MessageBox.Show(ex.Message); /保存地图 private void SavemapItem_Click(object sender, EventArgs e) if (this.axMap.LayerCount = 0) return; Save

7、FileDialog s = new SaveFileDialog(); s.Title = 保存地图; s.DefaultExt = .mxd; s.AddExtension = true; s.CheckFileExists = true; if (s.ShowDialog() = DialogResult.OK) IMxdContents pMxdC; pMxdC = this.axMap.Map as IMxdContents; IMapDocument pMapDocument = new MapDocumentClass(); pMapDocument.New(s.FileName

8、); IActiveView pActiveView = this.axMap.Map as IActiveView; pMapDocument.ReplaceContents(pMxdC); pMapDocument.Save(true, true); /退出程序 private void ExitappItem_Click(object sender, EventArgs e) Application.Exit(); /关于对话框 private void AboutItem_Click(object sender, EventArgs e) AboutBox1 a = new About

9、Box1(); a.ShowDialog(); /酒店统计 private void HotelcntItem_Click(object sender, EventArgs e) Form2 f = new Form2(2); f.ShowDialog(); if (f.QueryString != string.Empty) IActiveView pActiveView = this.axMap.Map as IActiveView; pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, this.axMap.

10、get_Layer(0), null); this.axMap.Map.ClearSelection(); pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, this.axMap.get_Layer(0), null); IFeatureLayer pFeatLyr = (IFeatureLayer)this.axMap.get_Layer(0); IQueryFilter pQueryFilter = new QueryFilterClass(); pQueryFilter.WhereClause = f.Q

11、ueryString; IFeatureSelection pFeatSel = pFeatLyr as IFeatureSelection; pFeatSel.SelectFeatures(pQueryFilter, esriSelectionResultEnum.esriSelectionResultNew, false); int k = pFeatSel.SelectionSet.Count; if (k = 0) MessageBox.Show(没有查询到符合条件的酒店.); else MessageBox.Show(共查询到 + k.ToString() + 个符合条件的酒店.);

12、 /酒店查询 private void HotelfindItem_Click(object sender, EventArgs e) Form2 f = new Form2(1); f.ShowDialog(); if (f.QueryString != string.Empty) IActiveView pActiveView = this.axMap.Map as IActiveView; pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, this.axMap.get_Layer(0), null); t

13、his.axMap.Map.ClearSelection(); pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, this.axMap.get_Layer(0), null); IFeatureLayer pFeatLyr = (IFeatureLayer)this.axMap.get_Layer(0); IQueryFilter pQueryFilter = new QueryFilterClass(); pQueryFilter.WhereClause = Name= + f.QueryString; IF

14、eatureSelection pFeatSel = pFeatLyr as IFeatureSelection; pFeatSel.SelectFeatures(pQueryFilter, esriSelectionResultEnum.esriSelectionResultNew, false); int k = pFeatSel.SelectionSet.Count; if (k = 0) MessageBox.Show(不存在此酒店.); Form2的代码:using System;using System.Collections.Generic;using System.Compon

15、entModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace HotelMap public partial class Form2 : Form private string querystring; private int k; public Form2(int i) InitializeComponent(); this.querystring = ; this.k = i; private void Form

16、2_Load(object sender, EventArgs e) this.Text = 酒店查询; if (this.k = 1) this.label1.Text = 请输入你要查询的酒店的名称:; else this.label1.Text = 请输入你要查询的酒店的条件:; private void btnOK_Click(object sender, EventArgs e) if (this.textBox1.Text != string.Empty) this.querystring = this.textBox1.Text; else MessageBox.Show(请输入

17、酒店名称.); private void btnCancel_Click(object sender, EventArgs e) this.Close(); public string QueryString get return this.querystring; 应用程序的入口代码:using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;namespace HotelMap static class Program / / 应用程序的主入口点。 / STAThrea

18、d static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1(); 5. 下面是程序运行界面的展示:程序载入目的地图程序打开地图文档的对话框程序根据酒店名称查询酒店程序保存地图文档的对话框程序根据条件统计酒店个数程序的关于对话框实习总结此次实习是制作一个简单的小地图系统。湘潭市雨湖区的酒店分布地图从网上截得的图片在ArcMap中矢量化得到,分为四个矢量图层。我负责所在组的软件制作。由于有以前的经验,做起来也比较得顺手,相对来说也比较的简单了。很多的东西像地图导航工具条都是系统提供的,不用自己去处理。像查询和统计是用矢量图层的要素条件检索即可得出,并在地图上可以高亮显示或者说是选中吧。其实一个简单的系统不难,难的是那些复杂的功能,看来我必须在这一方面努力了。此次实习,收获很大。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1