GIS实验报告课件
- 格式:doc
- 大小:2.29 MB
- 文档页数:14
GIS原理实验一实验报告
实验一:GIS原理实验报告
一、实验目的:
1.了解GIS原理的基本概念和基本原理;
2.掌握ArcGIS软件的基本操作方法;
二、实验仪器与材料:
1.计算机;
2.ArcGIS软件。
三、实验原理及方法:
1.实验原理:
GIS(地理信息系统)是一种用来存储、管理、查询、分析和显示地理位置相关的数据的系统。
它通过将地理数据与属性数据结合起来,可以用来理解和分析地理问题。
GIS技术在地理学、城市规划、环境科学等领域具有广泛的应用。
2.实验方法:
四、实验步骤:
1.启动ArcGIS软件,在主界面点击“打开”按钮,选择一个已有的地理数据文件进行加载。
3.通过“绘制”工具栏的不同绘图工具,可以在地图上绘制点、线、面等地理要素。
4.选择“选择”工具栏,可以对地理要素进行选择操作,如选择一个
区域内的所有要素。
5.选择“查询”工具栏,可以对地理要素进行属性查询操作,如查询
其中一字段大于其中一值的要素。
6.选择“分析”工具栏,可以对地理要素进行空间分析操作,如计算
两个要素之间的距离。
五、实验结果与分析:
六、实验总结:
七、实验心得:
通过本次实验,我对GIS原理有了更深入的了解,并掌握了ArcGIS
软件的基本操作方法。
在实验过程中,我遇到了一些困难,但通过查阅相
关资料和询问老师的帮助,我顺利完成了实验。
实验中,我发现GIS技术
的应用非常广泛,对于我们理解地理问题和进行地理数据分析非常有帮助。
我会继续学习和研究GIS技术,提高自己的技能水平。
GIS课程实验报告姓名:学号:学院:班级:目录1.地理配准与空间建库 (2)1.1实验要求 (2)1.2实验思路 (3)1.3实验步骤 (3)1.4实验总结 (9)2.邻近分析 (10)2.1实验要求 (10)2.2实验思路 (10)2.3实验步骤 (11)2.4实验总结 (21)3.空间分析练习:叠置分析 (22)3.1实验要求 (22)3.2实验思路 (22)3.3实验步骤 (22)3.4实验总结 (31)4.ArcMap制图-地图版面设计 (33)5.1实验要求 (33)5.2实验思路 (33)5.3实验步骤 (33)5.4实验总结 (51)1.地理配准与空间建库1.1实验要求1、利用影像配准(Georeferencing)工具进行影像数据的地理配准2、编辑器的使用(点要素、线要素、多边形要素的数字化)。
3、利用ArcCatalog管理地理空间数据库,理解Personal Geodatabse空间数据库模型的有关概念。
4、掌握在ArcMap中编辑属性数据的基本操作。
5、掌握根据GPS数据文件生成矢量图层的方法和过程。
1.2实验思路本次实验是将扫描的地形图栅格文件,通过选择控制点,将屏幕坐标转换到地理坐标中,设定数据框的属性,规划单位及坐标系统。
然后对纠正后的地图进行重采样处理。
利用ArcGis 的交互性处理,在Catalog中创建数据库,添加要素类型,之后在ArcMap界面中编辑,进行分层矢量化处理,将地形地物分类存入数据库中。
1.3实验步骤1.3.1加载数据和影像配准工具打开ArcMap,添加“地理配准”工具栏,单击右键弹出工具栏,选择“地理配准”。
把需要进行配准的影像—70011-1.TIF增加到ArcMap中1.3.2输入控制点点击“地理配准”工具栏中“添加控制点”选项,在图中选择控制点。
输入其实际坐标。
2)用相同的方法,在影像上增加多个控制点(大于7个),输入它们的实际坐标。
点击“影像配准”工具栏上的“查看链接表”按钮。
《GIS原理与应用》课程实验报告四实验名称空间数据处理实验目的1.掌握空间数据处理(融合、拼接、剪切、交叉、合并)的基本方法,原理。
领会其用途。
2.掌握地图投影变换的基本原理与方法。
3.熟悉ArcGIS中投影的应用及投影变换的方法、技术4.了解地图投影及其变换在实际中的应用。
实验原理空间数据处理是基于已有数据派生新数据的一种方法。
是通过空间分析方法来实现的。
是基于矢量数据进行的,包括如下几种常用的操作:融合,剪切,拼接,合并(并集),相交(交集)。
实验数据云南县界.shp; Clip.shp西双版纳森林覆盖.shp 西双版纳县界.shp实验过程记录:一、试验主要步骤第1步裁剪要素在ArcMap中,添数据GISDATA\云南县界.shp,添加数据GISDATA\Clip.shp (Clip 中有四个要素)激活Clip图层。
选中Clip图层中的一个要素,点击打开ArcToolbox,指定输出要素类路径及名称,这里请命名为“云南县界_Clip1”指定输入类:云南县界指定剪切要素:Clip(必须是多边形要素),重复以上的操作步骤,完成操作后将得到共四个图层。
注意确保不要选中“云南县界”中的要素,如果选择了“云南县界”中的要素裁剪完成的只是被选中的那一部分要素。
第2步 拼接图层在ArcMap 中新建地图文档,加载你在剪切要素操作中得到的四个图层 点击打开ArcToolbox ,在ArcToolbox 中执行“追加”命令,输出要素:设定为 云南县界_Clip1,输入要素:依次添加其它三个图层,右键点击图层“云南县界_Clip1”,在出现的右键菜单中执行“数据”->”导出数据”。
指定导入数据的路径和名称:YNOK.shp,通过以上操作我们就完成了将4个图层拼接为一个图层的处理。
四个图层一个图层加载数据YNOK.shp ,查看图层及打开其属性表看看与“云南县界”中的属性表有何区别。
(右下图可知YNOK 的记录比云南县界的记录要多,各属性值也不完全一样。
GIS原理实验二实验报告1、阐述基本原理和概念(要素类、要素数据集)答:要素类(feature class):在ArcGIS中是指具有相同的几何特征的要素集合,比如点的集合,表现为shapefile或者是Geodatabase中的feature class。
要素数据集(feature dataset):在ArcGIS中表现为geodatabase中的feature dataset,在一个数据集中所有的feature class都具有相同的坐标系统,一般也是在相同的区域。
Geodatabse 空间数据库模型的特点。
答:空间参考Geodatabase 在要素类和数据集中对空间参考信息进行了完整的定义。
表定义Geodatabase 空间几何数据与属性数据保存在同一个表(要素类)中。
拓扑规则Geodatabase 的拓扑关系管理机制在以下几个方面具有明显的优势:(1)用户可自行定义哪些要素类将受拓扑关系规则约束;(2)多个点、线、面要素类(层)可以同时受同一组拓扑关系规则约束;(3)提供了大量的拓扑关系规则;(4)用户为自己的数据可以自行指定必要的拓扑关系规则;(5)拓扑关系及规则是在符合工业标准的DBMS(数据管理系统)中进行管理,可支持多用户并发处理;(6)用户可以局部建立或检查拓扑关系,以提高生产效率。
3、1:M 空间查询的实现原理及应用实例。
答:(1)选择已经建立的地理数据库-Yunnan.mdb,点击右键,在出现的菜单中选择-(2)按照上图显示输入名称,选择公交站点和公交路线,然后下一步(3)当进行到上图时,选择1—M,即一对多。
接着点击下一步。
(4)当进行到如上图时,在两处选择公交站点编号(5)点击“完成”,则完成公交站点到公交路线1—M的关系(6)最后得到如下图所示,可以对1—M关系进行查询4、比较连接(Join)和关联(Link)关系的区别和应用。
(1)区别:连接:连接可以添加额外的属性数据到当前图层,也可以使用这些额外的属性数据进行标注。
实验报告GIS应用软件开发专业:测绘工程班级: 10级测绘三班姓名:学号:****:**撰写时间:2013年5月20日星期一目录一、程序运行演示 (2)二、问题及解决方案 (6)三、源程序代码 (7)四、心得体会 (14)一、程序运行演示1.新建项目文件,并实现file中的基本功能,显示地图基本要素。
如图1图12.在工具栏加载按钮,按钮功能是对当前视图缩小3倍;在工具栏加载工具,工具功能在地图上标注当前日期。
如图2图2按钮实现缩小3倍功能操作,如图3图33.点击地图节点,弹出如图4,图5菜单并实现菜单中的内容:图4图54.点击图层节点,弹出如图6菜单并需要实现菜单中的内容图65.点击Legend Class,弹出符号选择对话框,该对话框供用户按需要选择符号并进行更改。
如图7图76.打开图层属性表,用户选择某条记录,可弹出如图8,9所示的右键菜单,并实现右键菜单中的内容图8图9二、问题及解决方案问题1.VS2008与2010之间要进行格式转换,按照所导向的步骤进行,否则程序将无法正常运行,出现错误问题2.构建好基本框架后,地图文档中要素显示出现问题。
此问题要添加licence控件,否则无法显示地图要素。
问题3.使用Toolbar和Toc功能时无法进行操作此问题应在属性设置时建立关联功能。
问题4.程序Program文件中要添加相应功能键语句,否则将无法实现功能。
问题5.引用接口,方法,例如ADF,要添加相应的引用,否则程序出现错误。
问题6.在实现两个自定义按钮与工具时,遇到的问题:先直接引用现有项未实现,发现缺少一些东西,后自己直接创建的Basetool和Basecommand类;在代码中报错,重新生成解决方案后顺利解决这个问题。
问题7.在实现地图和图层节点的右键功能时,遇到琐碎的问题,在这个过程中直接引用老师所给的几个类,但是报错,是因为命名空间未做修改;缺少引用,需要根据错误提示添加相应的引用三、源程序代码using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Runtime.InteropServices;using ESRI.ArcGIS.esriSystem;using ESRI.ArcGIS.Carto;using ESRI.ArcGIS.Controls;using ESRI.ArcGIS.ADF;using ESRI.ArcGIS.SystemUI;using ESRI.ArcGIS.Display;namespace WindowsFormsApplication2{public partial class MainForm : Form{#region class private membersprivate IMapControl3 m_mapControl = null;private string m_mapDocumentName = string.Empty;#endregionIMapDocument m_MapDocument = new MapDocument();#region class constructorprivate ITOCControl2 m_tocControl;private IToolbarMenu m_menuMap;private IToolbarMenu m_menuLayer;private ZoomIn3XCMD1 test = new ZoomIn3XCMD1();public MainForm(){InitializeComponent();}private void newDocumentToolStripMenuItem_Click(object sender, EventArgs e){ICommand command = new CreateNewDocument();command.OnCreate(m_mapControl.Object);command.OnClick();}private void openDocumentToolStripMenuItem_Click(object sender, EventArgs e){openFileDialog1.Title = "Save Map Document As";openFileDialog1.Filter = "Map Documents (*.mxd)|*.mxd";openFileDialog1.ShowDialog();string sFilePath = openFileDialog1.FileName;if (axMapControl1.CheckMxFile(sFilePath)){axMapControl1.MousePointer = esriControlsMousePointer.esriPointerHourglass;axMapControl1.LoadMxFile(sFilePath, 0, Type.Missing);axMapControl1.MousePointer = esriControlsMousePointer.esriPointerDefault;}else{MessageBox.Show(sFilePath + "is not a valid ArcMap document");return;}private void MainForm_Load(object sender, EventArgs e){//get the MapControlm_mapControl = (IMapControl3)axMapControl1.Object;//disable the Save menu (since there is no document yet)this.menuSaveDoc.Enabled = false;//定义地图右键菜单,图层右键菜单m_tocControl = (ITOCControl2)axTOCControl1.Object;m_mapControl = (IMapControl3)axMapControl1.Object;//添加菜单到地图节点m_menuMap = new ToolbarMenu();m_menuMap.AddItem("esriControls.ControlsAdddataCommand", -1, 0, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuMap.AddItem(new LayerVisibility(), 1, 1, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuMap.AddItem(new LayerVisibility(), 2, 2, false, esriCommandStyles.esriCommandStyleTextOnly);//添加菜单到图层节点m_menuLayer = new ToolbarMenu();m_menuLayer.AddItem(new OpenAttributeTableCmd(), -1, 0, false, esriCommandStyles.esriCommandStyleIconAndText);//右键添加属性表m_menuLayer.AddItem(new RemoveLayer(), 1, 1, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new RemoveLayer(), 1, 2, true, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new ScaleThresholds(), 2, 3, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new ScaleThresholds(), 3, 4, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new LayerSelectable(), 1, 5, true, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new LayerSelectable(), 2, 6, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new ZoomToLayer(), -1, 7, true, esriCommandStyles.esriCommandStyleTextOnly);//Set the hook of each menum_menuLayer.SetHook(m_mapControl);m_menuMap.SetHook(m_mapControl);axToolbarControl1.AddItem(test, -1, -1, true, 0, esriCommandStyles.esriCommandStyleIconAndText);axToolbarControl1.AddItem(new AddDateTool(), -1, -1, false, 0,esriCommandStyles.esriCommandStyleIconAndText);}private void saveDocumentToolStripMenuItem_Click(object sender, EventArgs e){//execute Save Document commandif (m_mapControl.CheckMxFile(m_mapDocumentName)){//create a new instance of a MapDocumentIMapDocument mapDoc = new MapDocument();mapDoc.Open(m_mapDocumentName, string.Empty);//Make sure that the MapDocument is not readonlyif (mapDoc.get_IsReadOnly(m_mapDocumentName)){MessageBox.Show("Map document is read only!");mapDoc.Close();return;}//Replace its contents with the current mapmapDoc.ReplaceContents((IMxdContents)m_mapControl.Map);//save the MapDocument in order to persist itmapDoc.Save(esRelativePaths, false);//close the MapDocumentmapDoc.Close();}}#endregionprivate void saveAsToolStripMenuItem_Click(object sender, EventArgs e){//execute SaveAs Document commandICommand command = new ControlsSaveAsDocCommand();command.OnCreate(m_mapControl);command.OnClick();}private void exitToolStripMenuItem_Click(object sender, EventArgs e){Application.Exit();}private void axMapControl1_OnMouseMove(object sender, IMapControlEvents2_OnMouseMoveEvent e){statusBarXY.Text = string.Format("{0}, {1} {2}", e.mapX.ToString("#######.##"), e.mapY.ToString("#######.##"), axMapControl1.MapUnits.ToString().Substring(4));}private void axMapControl1_OnMapReplaced(object sender, IMapControlEvents2_OnMapReplacedEvent e){test.m_activeView = this.axMapControl1.ActiveView;//添加两个工具时添加//get the current document name from the MapControlm_mapDocumentName = m_mapControl.DocumentFilename;//if there is no MapDocument, diable the Save menu and clear the statusbarif (m_mapDocumentName == string.Empty){menuSaveDoc.Enabled = false;statusBarXY.Text = string.Empty;}else{//enable the Save manu and write the doc name to the statusbarmenuSaveDoc.Enabled = true;statusBarXY.Text = Path.GetFileName(m_mapDocumentName);}}private void axTOCControl1_OnMouseDown(object sender, ITOCControlEvents_OnMouseDownEvent e){if (e.button == 1){//IBasicMap map = new Map();IMap Map = new Map();IBasicMap map = (IBasicMap)Map;ILayer layer = new FeatureLayer();object other = new object();object index = new object();esriTOCControlItem item = new esriTOCControlItem();//Determine what kind of item has been clicked onaxTOCControl1.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);//QI to IFeatureLayer and IGeoFeatuerLayer interfaceif (layer == null) return;IFeatureLayer featureLayer = layer as IFeatureLayer;if (featureLayer == null) return;IGeoFeatureLayer geoFeatureLayer = (IGeoFeatureLayer)featureLayer;ILegendClass legendClass = new LegendClass();ISymbol symbol = null;if (other is ILegendGroup && (int)index != -1){legendClass = ((ILegendGroup)other).get_Class((int)index);symbol = legendClass.Symbol;}if (symbol == null) return;symbol = GetSymbolByControl(symbol);//symbol = GetSymbolBySymbolSelector(symbol);if (symbol == null) return;legendClass.Symbol = symbol;this.Activate();//Fire contents changed event that the TOCControl listens toaxMapControl1.ActiveView.ContentsChanged();//Refresh the displayaxMapControl1.Refresh(esriViewDrawPhase.esriViewGeography, null, null);axTOCControl1.Update();}if (e.button == 2){esriTOCControlItem item = esriTOCControlItem.esriTOCControlItemNone;IBasicMap map = null; ILayer layer = null;object other = null; object index = null;//Determine what kind of item is selectedm_tocControl.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);//Ensure the item gets selectedif (item == esriTOCControlItem.esriTOCControlItemMap)m_tocControl.SelectItem(map, null);elsem_tocControl.SelectItem(layer, null);// Set the layer into the CustomProperty (this is used by the custom layer commands)m_mapControl.CustomProperty = layer;//Popup the correct context menuif (item == esriTOCControlItem.esriTOCControlItemMap) m_menuMap.PopupMenu(e.x, e.y, m_tocControl.hWnd);if (item == esriTOCControlItem.esriTOCControlItemLayer) m_menuLayer.PopupMenu(e.x, e.y, m_tocControl.hWnd);}}private ISymbol GetSymbolByControl(ISymbol symbolType){ISymbol symbol = null;IStyleGalleryItem styleGalleryItem = null;esriSymbologyStyleClass styleClass = esriSymbologyStyleClass.esriStyleClassMarkerSymbols;if (symbolType is IMarkerSymbol){styleClass = esriSymbologyStyleClass.esriStyleClassMarkerSymbols;}if (symbolType is ILineSymbol){styleClass = esriSymbologyStyleClass.esriStyleClassLineSymbols;}if (symbolType is IFillSymbol){styleClass = esriSymbologyStyleClass.esriStyleClassFillSymbols;}GetSymbolByControlForm symbolForm = new GetSymbolByControlForm(styleClass);symbolForm.ShowDialog();styleGalleryItem = symbolForm.m_styleGalleryItem;if (styleGalleryItem == null) return null;symbol = styleGalleryItem.Item as ISymbol;symbolForm.Dispose();this.Activate();return symbol;}}}四、心得体会本次实验过程中,值得肯定的是,已对AO开发一般流程基本掌握:新建项目、搭建框架、实现各个框架中的各个功能、添加引用与类。
------------------- 啦磊吻吋 ................ --------------------计算机地质应用软件MapGIS 软件实验报告、实验目的1•了解MapGIS 软件结构; 2熟悉MapGIS 配置以及操作方法;3掌握MapGIS 基本的数据编辑以及地图制图功能。
、实验环境1. 操作系统:Win dows 72. GIS 软件平台:MapGIS 6.7 三、实验任务1.配置MapGIS 软件环境;在主菜单界面点击设置键,对工作目录进行设置。
2建立新的MapGIS 工程;点击图形处理,输入编辑,在弹出的每个对话框中根据需要进行设置,冒戌PG 也孤豈4!■■■MAFGES6 7 羊加\倔口閱他J3LEB刖测源M型海肌-srF孕號直口录:丨 声尸财冃昱 工低目就1丨 |茹丫诂测 in依次单击"确定”按钮,新建一个工程。
II从文件导入••伪定|瑕消|览图參隸基建内容坐标系:用户自定义坐标系拽影类型:0:地理坐标系单往:薑米比例尺0・血图呀竟度:0 000 冒临离度:| oonoc(\\S n(\------------------- # 磊 Sr# --------- --------------3•实现点、线、区数据的新建、保存和打开;在左侧空白区域,点击右键,依次新建点、线、面文件。
保存点、线、面文件点击 右键进行保存。
%*3"IS k•; Ftw r«r*'K L[T*« Hf 石审 1M -山=-*占* £fy* O*W WflUUu[□ 6 G ; U H t -怦击与I d F T.. ——............ 春晶.............. ......... ——............ 附H/prcf........................ . ................邂F文件字化L线编辑R区编辑N庶编辑V矢量化T其它A图层S系统库CM 6殳怕閤E|B參»g臣也|J« ▼必心撤| 2不尙圏M韵]山*咒込单文件名I姦色猊妙H Blijun.wt 刘滾加项目新建点新建线新建区新建网属性修改地匿参数取消显示限制全部选走(Ctrl+A) 反向选样------------------- 附磊讥T#-........... .. .......... ..................4•输入MapGIS点数据1)生成注释:要求输入三种以上不同颜色、字体(要求包括镂空字体)的注释,并包括上角标、下角标;点编辑、输入点图元、注释;选择不同颜色和字体,点击确定;字体一栏在数字前添加-号即可镂空字体;上下角标分别在输入字前加ctrl+、Ctrl-。
实验一图像配准第一步:单击图标加载所需要配准的图,或者直接把所要校正的图片拖入的工作界面。
第二步:在空白处单击右键,选择命令。
单击命令,把命令去掉。
然后单击图标,添加控制点,控制点不能少于4个,且尽量均匀分布,在控制点上单击右键,选择输入X和Y,x填写经度,y填写纬度。
配准过程中点的分布:校正后点的分布:第三步:单击图标,查看RMS,总的RMS要小于0.05,经过对比,三阶多项式下的RMS值最小,为0.02767,所以,以此为最后结果。
保存配准后的图片。
一阶多项式下的图:二阶多项式下的图:三阶多项式下的图:连接表:实验二数字化第一步:打开,在空白处单击右键,选择,打开创建新Shapefile窗口,在要素类型为点的情况,名称命为省会,在要素类型为线的情况下,命名为中国主要河流,在要素类型为面的情况下,命名为中国政区,分别单击确定。
第二步:把刚建立的面图层图层拖到Arc Map中,然后点击,单击开始编辑,在Arc Map的创建要素窗口选择,选用编辑器中的合适工具,开始编辑面图层。
编辑过程中及面图层下的中国政区:第三步:右击,选择,打开编辑器,开始编辑各省名称。
第四步:右击,选择标注要素,各省名称就显示在了图上。
第五步:以同样的方式编辑省会和主要河流。
点图层下的各个省会:线图层下的主要河流:点线面图层下的中国政区:实验三点线面符号设计(一)面符号设计第一步:在面图层下打开符号编辑器,单击按钮,打开符号属性编辑器,进行设置。
第二步:在类型中选择标记填充符号,单击按钮,选择自己喜爱的符号,单击按钮,选择自己喜欢的边框,选中网格,单击确定。
第三步:在符号选择器窗口中单击另存为按钮进行命名,单击完成。
面图层下的符号1:面图层下的符号2:(二)线图层步骤与面图层的相似。
线图层下的符号1:线图层下的符号2:(三)点图层的设置步骤与面图层的相似。
点图层下的符号1:点图层下的符号2:实验四拓扑(一)创建拓扑第一步:在Arccatelogy目录树的GIS中,单击右键建立一个人地理数据库,命名为我的数据库,在新建的我的数据库右键选择新建中的要素数据集,创建要素数据集,命名为我的数据集,单击下一步,在新建要素数据集窗口中选择,单击下一步到完成。
gis实验报告GIS实验报告引言:地理信息系统(GIS)是一种集成了地理数据收集、管理、分析和可视化的技术系统。
它在各个领域中得到广泛应用,包括城市规划、环境保护、农业、交通管理等。
本实验旨在探究GIS在城市规划中的应用,以及其对可持续发展的贡献。
一、GIS在城市规划中的应用1.1 地理数据收集与管理GIS通过收集和整理地理数据,包括地形地貌、土地利用、人口分布等,为城市规划提供了基础数据。
这些数据可以通过遥感技术获取,也可以通过实地调查获得。
GIS能够将这些数据进行管理,实现数据的存储、更新和共享,为规划决策提供有力支持。
1.2 空间分析与模拟GIS能够对城市空间进行分析和模拟,帮助规划者了解城市的发展趋势和潜在问题。
通过空间分析,可以评估不同规划方案的影响,比较不同区域的优劣势,为规划决策提供科学依据。
同时,GIS还可以进行城市模拟,预测城市未来的发展情况,为规划者提供参考。
1.3 可视化展示与决策支持GIS能够将地理数据以图形化的方式展示出来,帮助规划者更直观地了解城市的情况。
通过地图、图表等形式,可以清晰地展示城市的地貌、道路网络、绿地分布等信息。
这些可视化的展示方式有助于规划者做出决策,并与相关利益方进行沟通和交流。
二、GIS对可持续发展的贡献2.1 环境保护与资源管理GIS在环境保护和资源管理方面发挥着重要作用。
通过对地理数据的分析和模拟,可以评估城市发展对环境的影响,制定相应的保护措施。
同时,GIS还可以帮助规划者合理利用土地资源,提高资源利用效率,实现可持续发展。
2.2 交通管理与城市运营GIS在交通管理和城市运营方面具有广泛应用。
通过对道路网络、交通流量等数据的分析,可以优化交通规划,提高交通效率,减少交通拥堵。
同时,GIS还可以对城市的公共设施进行管理,包括水电供应、垃圾处理等,提高城市的运营效率。
2.3 社会经济发展与决策支持GIS在社会经济发展和决策支持方面发挥着重要作用。
实验报告2016 至2017 学年第 1 学期课程名称:地理信息系统院(系): 地理与城乡规划学院专业:地理科学班级:地理141学号:20140203050126学生姓名:王兴永2016年12 月12日兰州城市学院实验报告院系:地理与城乡规划学院一、实验目的和要求ArcGIS软件的认识及简单的运用;二、实验内容对甘肃地图栅格数据进行转换,并对图层进行要素创建;三、实验数据及环境甘肃省行政区纸质扫描图、ArcMap软件四、操作方法与实验步骤1、新建数据打开ArcCatalog,新建“个人地理数据库.mdb”,在该数据库下新建“要素类”,包括点要素县和市、线要素道路以及多边形要素行政区。
2、添加甘肃省行政区纸质扫描图,打开“编辑器”,点击“创建要素”对话框,对行政区进行要素创建,点击编辑器工具条中的“裁剪面工具”按钮,围绕甘肃省省界线进行裁剪,双击完成裁剪操作,如图1.3、打开行政区的属性对话框,在“显示”选项卡中将透明度调整为50%,按上一步的操作,将甘肃省的市级甚至县级行政区裁剪出来,双击完成操作。
4、打开图层县的属性表,新建字段“县”;对图层县进行创建要素,参照纸质扫描图层,每编辑一个点就在属性表的新字段中做出标记,直至编辑完所有的县。
5、仿照上一步,对市进行相同的编辑操作。
6、对图层县、图层市的样式以及系统符号进行适当的调整;打开图层行政区的属性对话框,在“符号系统”中选择“唯一值”,选择任意字段,调整色带,添加所有值,应用关闭。
五、实验成果及分析实验分析:通过这次实验的学习,我可以灵活应用一些简单的画线、画图等工具,此外还知道一些窗口中基本的面板的位置和如何打开这些面板。
如何搜素这些面板,在这过程中我不但找到了我熟悉的面板而且更加熟悉了菜单栏中其他命令的位置,这对于以后其他命令的应用具有很大的帮助。
在本次应用ARCMAP软件将地图数据矢量化的过程中学习到如何添加点要素、线要素、面要素,将数据甘肃地图中省际矢量化、县际矢量化、国道矢量化、铁路矢量化、市、县进行矢量化。
实验报告GIS应用软件开发专业:测绘工程班级:10 级测绘三班姓名:学号:****:**撰写时间:2013 年5 月20 日星期一目录一、程序运行演示 (2)二、问题及解决方案 (6)三、源程序代码 (7)四、心得体会 (14)一、程序运行演示1. 新建项目文件,并实现file 中的基本功能,显示地图基本要素。
如图 1图12. 在工具栏加载按钮,按钮功能是对当前视图缩小 3 倍;在工具栏加载工具,工具功能在地图上标注当前日期。
如图 2图2按钮实现缩小 3 倍功能操作,如图 3图33.点击地图节点,弹出如图4,图5 菜单并实现菜单中的内容:图4图54. 点击图层节点,弹出如图 6 菜单并需要实现菜单中的内容图65. 点击Legend Class ,弹出符号选择对话框,该对话框供用户按需要选择符号并进行更改。
如图7图76.打开图层属性表,用户选择某条记录,可弹出如图8,9 所示的右键菜单,并实现右键菜单中的内容图8图9二、问题及解决方案问题1.VS2008 与2010 之间要进行格式转换,按照所导向的步骤进行,否则程序将无法正常运行,出现错误问题2. 构建好基本框架后,地图文档中要素显示出现问题。
此问题要添加licence 控件,否则无法显示地图要素。
问题3. 使用Toolbar 和Toc功能时无法进行操作此问题应在属性设置时建立关联功能。
问题4. 程序Program文件中要添加相应功能键语句,否则将无法实现功能。
问题5. 引用接口,方法,例如ADF,要添加相应的引用,否则程序出现错误。
问题6. 在实现两个自定义按钮与工具时,遇到的问题:先直接引用现有项未实现,发现缺少一些东西,后自己直接创建的Basetool 和Basecomman类d ;在代码中报错,重新生成解决方案后顺利解决这个问题。
问题7. 在实现地图和图层节点的右键功能时,遇到琐碎的问题,在这个过程中直接引用老师所给的几个类,但是报错,是因为命名空间未做修改;缺少引用,需要根据错误提示添加相应的引用三、源程序代码using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Runtime.InteropServices;using ESRI.ArcGIS.esriSystem;using ESRI.ArcGIS.Carto;using ESRI.ArcGIS.Controls;using ESRI.ArcGIS.ADF;using ESRI.ArcGIS.SystemUI;using ESRI.ArcGIS.Display;namespace WindowsFormsApplication2{public partial class MainForm : Form{#region class private membersprivate IMapControl3 m_mapControl = null;private string m_mapDocumentName = string.Empty;#endregionIMapDocument m_MapDocument = new MapDocument();#region class constructorprivate ITOCControl2 m_tocControl;private IToolbarMenu m_menuMap;private IToolbarMenu m_menuLayer;private ZoomIn3XCMD1 test = new ZoomIn3XCMD1();public MainForm(){InitializeComponent();}private void newDocumentToolStripMenuItem_Click(object sender, EventArgs e){ICommand command = new CreateNewDocument();command.OnCreate(m_mapControl.Object);command.OnClick();}private void openDocumentToolStripMenuItem_Click(object sender, EventArgs e){openFileDialog1.Title = "Save Map Document As";openFileDialog1.Filter = "Map Documents (*.mxd)|*.mxd";openFileDialog1.ShowDialog();string sFilePath = openFileDialog1.FileName;if (axMapControl1.CheckMxFile(sFilePath)){axMapControl1.MousePointer = esriControlsMousePointer.esriPointerHourglass;axMapControl1.LoadMxFile(sFilePath, 0, Type.Missing);axMapControl1.MousePointer = esriControlsMousePointer.esriPointerDefault;}else{MessageBox.Show(sFilePath + "is not a valid ArcMap document");return;}}private void MainForm_Load(object sender, EventArgs e){//get the MapControlm_mapControl = (IMapControl3)axMapControl1.Object;//disable the Save menu (since there is no document yet)this.menuSaveDoc.Enabled = false;// 定义地图右键菜单,图层右键菜单m_tocControl = (ITOCControl2)axTOCControl1.Object;m_mapControl = (IMapControl3)axMapControl1.Object;// 添加菜单到地图节点m_menuMap = new ToolbarMenu();m_menuMap.AddItem("esriControls.ControlsAdddataCommand", -1, 0, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuMap.AddItem(new LayerVisibility(), 1, 1, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuMap.AddItem(new LayerVisibility(), 2, 2, false, esriCommandStyles.esriCommandStyleTextOnly);// 添加菜单到图层节点m_menuLayer = new ToolbarMenu();m_menuLayer.AddItem(new OpenAttributeTableCmd(), -1, 0, false, esriCommandStyles.esriCommandStyleIconAndText);// 右键添加属性表m_menuLayer.AddItem(new RemoveLayer(), 1, 1, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new RemoveLayer(), 1, 2, true, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new ScaleThresholds(), 2, 3, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new ScaleThresholds(), 3, 4, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new LayerSelectable(), 1, 5, true, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new LayerSelectable(), 2, 6, false, esriCommandStyles.esriCommandStyleTextOnly);m_menuLayer.AddItem(new ZoomToLayer(), -1, 7, true, esriCommandStyles.esriCommandStyleTextOnly);//Set the hook of each menum_menuLayer.SetHook(m_mapControl);m_menuMap.SetHook(m_mapControl);axToolbarControl1.AddItem(test, -1, -1, true, 0, esriCommandStyles.esriCommandStyleIconAndText);axToolbarControl1.AddItem(new AddDateTool(), -1, -1, false, 0,esriCommandStyles.esriCommandStyleIconAndText);}private void saveDocumentToolStripMenuItem_Click(object sender, EventArgs e){//execute Save Document commandif (m_mapControl.CheckMxFile(m_mapDocumentName)){//create a new instance of a MapDocumentIMapDocument mapDoc = new MapDocument();mapDoc.Open(m_mapDocumentName, string.Empty);//Make sure that the MapDocument is not readonlyif (mapDoc.get_IsReadOnly(m_mapDocumentName)){MessageBox.Show("Map document is read only!");mapDoc.Close();return;}//Replace its contents with the current mapmapDoc.ReplaceContents((IMxdContents)m_mapControl.Map);//save the MapDocument in order to persist itmapDoc.Save(esRelativePaths, false);//close the MapDocumentmapDoc.Close();}}#endregionprivate void saveAsToolStripMenuItem_Click(object sender, EventArgs e){//execute SaveAs Document commandICommand command = new ControlsSaveAsDocCommand();command.OnCreate(m_mapControl);command.OnClick();}private void exitToolStripMenuItem_Click(object sender, EventArgs e){Application.Exit();}private void axMapControl1_OnMouseMove(object sender, IMapControlEvents2_OnMouseMoveEvent e){statusBarXY.Text =string.Format("{0}, {1} {2}", e.mapX.ToString("#######.##"),e.mapY.ToString("#######.##"), axMapControl1.MapUnits.ToString().Substring(4));}private void axMapControl1_OnMapReplaced(object sender, IMapControlEvents2_OnMapReplacedEvent e){test.m_activeView = this.axMapControl1.ActiveView;// 添加两个工具时添加//get the current document name from the MapControlm_mapDocumentName = m_mapControl.DocumentFilename;//if there is no MapDocument, diable the Save menu and clear the statusbarif (m_mapDocumentName == string.Empty){menuSaveDoc.Enabled = false;statusBarXY.Text = string.Empty;}else{//enable the Save manu and write the doc name to the statusbarmenuSaveDoc.Enabled = true;statusBarXY.Text = Path.GetFileName(m_mapDocumentName);}}private void axTOCControl1_OnMouseDown(object sender, ITOCControlEvents_OnMouseDownEvent e){if (e.button == 1){//IBasicMap map = new Map();IMap Map = new Map();IBasicMap map = (IBasicMap)Map;ILayer layer = new FeatureLayer();object other = new object();object index = new object();esriTOCControlItem item = new esriTOCControlItem();//Determine what kind of item has been clicked onaxTOCControl1.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);//QI to IFeatureLayer and IGeoFeatuerLayer interfaceif (layer == null) return;IFeatureLayer featureLayer = layer as IFeatureLayer;if (featureLayer == null) return;IGeoFeatureLayer geoFeatureLayer = (IGeoFeatureLayer)featureLayer;ILegendClass legendClass = new LegendClass();ISymbol symbol = null;if (other is ILegendGroup && (int)index != -1){legendClass = ((ILegendGroup)other).get_Class((int)index);symbol = legendClass.Symbol;}if (symbol == null) return;symbol = GetSymbolByControl(symbol);//symbol = GetSymbolBySymbolSelector(symbol);if (symbol == null) return;legendClass.Symbol = symbol;this.Activate();//Fire contents changed event that the TOCControl listens toaxMapControl1.ActiveView.ContentsChanged();//Refresh the displayaxMapControl1.Refresh(esriViewDrawPhase.esriViewGeography, null, null);axTOCControl1.Update();}if (e.button == 2){esriTOCControlItem item = esriTOCControlItem.esriTOCControlItemNone;IBasicMap map = null; ILayer layer = null;object other = null; object index = null;//Determine what kind of item is selectedm_tocControl.HitTest(e.x, e.y, ref item, ref map, ref layer, ref other, ref index);//Ensure the item gets selectedif (item == esriTOCControlItem.esriTOCControlItemMap)m_tocControl.SelectItem(map, null);elsem_tocControl.SelectItem(layer, null);// Set the layer into the CustomProperty (this is used by the custom layer commands)m_mapControl.CustomProperty = layer;//Popup the correct context menuif (item == esriTOCControlItem.esriTOCControlItemMap)m_menuMap.PopupMenu(e.x, e.y, m_tocControl.hWnd);if (item == esriTOCControlItem.esriTOCControlItemLayer)m_menuLayer.PopupMenu(e.x, e.y, m_tocControl.hWnd);}}private ISymbol GetSymbolByControl(ISymbol symbolType){ISymbol symbol = null;IStyleGalleryItem styleGalleryItem = null;esriSymbologyStyleClass styleClass = esriSymbologyStyleClass.esriStyleClassMarkerSymbols;if (symbolType is IMarkerSymbol){styleClass = esriSymbologyStyleClass.esriStyleClassMarkerSymbols;}if (symbolType is ILineSymbol){styleClass = esriSymbologyStyleClass.esriStyleClassLineSymbols;}if (symbolType is IFillSymbol){styleClass = esriSymbologyStyleClass.esriStyleClassFillSymbols;}GetSymbolByControlForm symbolForm = new GetSymbolByControlForm(styleClass);symbolForm.ShowDialog();styleGalleryItem = symbolForm.m_styleGalleryItem;if (styleGalleryItem == null) return null;symbol = styleGalleryItem.Item as ISymbol;symbolForm.Dispose();this.Activate();return symbol;}}}四、心得体会本次实验过程中,值得肯定的是,已对AO开发一般流程基本掌握:新建项目、搭建框架、实现各个框架中的各个功能、添加引用与类。