欢迎来到冰豆网! | 帮助中心 分享价值,成长自我!
冰豆网
全部分类
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • 党团工作>
  • ImageVerifierCode 换一换
    首页 冰豆网 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

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

    • 资源ID:9204695       资源大小:366.94KB        全文页数:15页
    • 资源格式: DOCX        下载积分:12金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要12金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    湘潭市雨湖区酒店分布电子地图软件设计报告.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中矢量化得到,分为四个矢量图层。我负责所在组的软件制作。由于有以前的经验,做起来也比较得顺手,相对来说也比较的简单了。很多的东西像地图导航工具条都是系统提供的,不用自己去处理。像查询和统计是用矢量图层的要素条件检索即可得出,并在地图上可以高亮显示或者说是选中吧。其实一个简单的系统不难,难的是那些复杂的功能,看来我必须在这一方面努力了。此次实习,收获很大。


    注意事项

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

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2022 冰点文档网站版权所有

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

    收起
    展开