ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt

上传人(卖家):三亚风情 文档编号:2477171 上传时间:2022-04-23 格式:PPT 页数:35 大小:3.45MB
下载 相关 举报
ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt_第1页
第1页 / 共35页
ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt_第2页
第2页 / 共35页
ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt_第3页
第3页 / 共35页
ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt_第4页
第4页 / 共35页
ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt_第5页
第5页 / 共35页
点击查看更多>>
资源描述

1、湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业第六讲地图组成及图层控制湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业主要内容4Element对象1235MapGrid对象MapSurround对象Style对象添加、删除图层数据6图层控制湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地

2、理信息系统专业一、Element对象湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象v如何理解如何理解Element对象对象? 在Map对象和PageLayout对象显示的数据除了地理数据之外,另一种即为元素数据(Element对象)。 Graphics Element都是作为图形的形式而存在,在Map视图或者PageLayout视图上是可见的; Frame Element是作为不可见的容器而存在的。 Map对象或者PageLayout对象可以通过IElement

3、接口和IGraphicsContainer接口来管理Element对象。 IGraphicsContainer接口添加、删除、更新Element; IElement确定Element对象的Geometry属性。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Elementv1、LineElement 在Map视图或PageLayout视图中表现为线的形式。 LineElement实现了ILineElement接口,ILineElement接口只

4、提供了Symbol属性,用于设置线的样式。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Elementv2、MarkerElement 在Map视图或PageLayout视图中表现为点的形式。 MarkerElement实现了IMarkerElement接口,IMarkerElement接口只提供了Symbol属性,用于设置点的样式。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理

5、信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Elementv3、TextElement 地图标注存在两种形式: 一种是保存在地理数据库中的标注; 另一种是使用TextElement。 TextElement实现了ITextElement接口,ITextElement提供了三个属性: ScaleText文字尺寸; Text字符; Symbol文字符号。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics E

6、lementv4、GroupElement GroupElement对象就是将多个Element对象编为一组,作为一个整体使用。 GroupElement对象实现了IGroupElement接口,该接口定义了6个属性和方法。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Elementv4、GroupElement 例:在PageLayout视图中添加GroupElementIGraphicsContainer pGC = this.axPag

7、eLayoutControl1.PageLayout as IGraphicsContainer;IGroupElement pGroupElement;pGroupElement = this.pJtGrid.JtGrids;if (pGroupElement != null)pGC.AddElement(pGroupElement as IElement,0);湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Elementv5、FillSh

8、apeElement FillShapeElement泛化出了CircleElement、EllipseElement、PolygonElement和RectangleElement等。 FillShapeElement实现了IFillShapeElement接口,该接口的Symbol属性,可以设置元素的样式。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Elementv6、PictureElement湖南湖南城市学院城市学院GIS二次开发二

9、次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Graphics Element湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业一、 Element对象-Frame ElementvMapFrame和和MapSurroundFrame Frame Element主要有两个对象:MapFrame(地图框架)和MapSurroundFrame(地图修饰框架)。 MapFrame对象是Map对象的的容

10、器,用于管理Map对象; MapSurroundFrame用于管理MapSurround(比例尺、比例文本、指北针等)对象。 MapSurroundFrame对象与MapFrame对象相连,当删除MapFrame时, MapSurroundFrame也将被删除。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业二、MapGrid对象v如何理解如何理解MapGrid对象?对象?MapGrid是布局视图中的一系列参考线和参考点,用来帮助地图使用者快速地确定地图要素的位置。湖南湖南城市学院城市学

11、院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业二、 MapGrid对象v如何理解如何理解MapGrid对象?对象?湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业二、 MapGrid对象v如何理解如何理解MapGrid对象?对象?不同类型的MapGrid湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系

12、统专业二、 MapGrid对象v如何理解如何理解MapGrid对象?对象? MapGrid对象实现了IMapGrid接口。湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、MapSurround对象v如何理解如何理解MapSurround对象?对象?湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象v如何理解如何理解MapSurround对象?对象?

13、湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象-图例对象v如何理解图例对象?如何理解图例对象?InterfacesDescriptionIActiveViewEventsProvides access to events that occur when the state of the active view changes.IBoundsPropertiesProvides access to members that control Bounds P

14、roperties.IClone (System)Provides access to members that control cloning of objects.IConnectionPointContainerSupports connection points for connectable objects.IGraphicsCompositeProvides access to members that control objects that are composed of graphic elements.ILegendProvides access to members th

15、at control a legend.ILegend2Provides access to additional members that control a legend.IMapSurroundProvides access to members that control the map surround.IPersistDefines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system.

16、 IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile. IPersistStream (System)IPropertySupport (System)Provides access to members that set a default property on an object.IQuerySizeProvides access to means to getting the size of an element.IRea

17、dingDirectionProvides access to members that control the reading direction.ITransformEvents (Display)Provides access to members that control Transform Events.湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象-图例对象v如何理解图例对象?如何理解图例对象?DescriptionAddItemAdds a

18、 new item to the legend (to the end of the list).AutoAddIndicates if a new item should be added when a new layer is added to the map.AutoReorderIndicates if the legend items should be kept in the same order as the layers.AutoVisibilityIndicates if items should be shown only when associated layers ar

19、e visible.ClearItemsRemoves all items from the legend.DelayEventsUsed to batch operations together to minimize notifications.DrawDraws the map surround into the specified display bounds.FitToBoundsAdjusts the map surround to fit the bounds. The changed argument indicates whether the size of the map

20、surround was changed.FlowRightReserved for future use.FormatThe formatting options for the legend (can be stored in the style gallery).IconIcon used to represent the map surround.InsertItemInserts a new item into the legend (at the location specified by index).ItemThe specified item from the legend.

21、ItemCountNumber of items in the legend.MapThe parent map.NameName of the map surround.QueryBoundsReturns the bounds of the map surround.RefreshMakes sure the latest updates are refected the next time the Map Surround is drawn.RemoveItemRemoves the specified item from the legend.TitleTitle.ILegend接口湖

22、南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象-指北针对象v如何理解指北针对象?如何理解指北针对象? 指北针对象(MarkerNorthArrow)实现了IMarkerNorthArrow接口。DescriptionMarkerSymbolSymbol used to draw the north arrow. Use set to specify a marker for custom north arrows.湖南湖南城市学院城市学院GIS二次开发二次

23、开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象-比例尺对象v如何理解比例尺对象?如何理解比例尺对象?湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象-比例尺对象v如何理解比例尺对象?如何理解比例尺对象?InterfacesDescriptionIBoundsPropertiesProvides access to members that control B

24、ounds Properties.IClone (System)Provides access to members that control cloning of objects.IConnectionPointContainerSupports connection points for connectable objects.IMapSurroundProvides access to members that control the map surround.IPersistDefines the single method GetClassID, which is designed

25、to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile. IPersistStream (System)IQuerySizeProvides access to means to getting the size of an element.湖南湖南城市学院城市学院GIS二次开

26、发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业三、 MapSurround对象-比例文本对象v如何理解比例文本对象?如何理解比例文本对象?湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业四、Style对象湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业四、 Style对象湖南湖南城市学院城市学院GIS二次开发

27、二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业四、 Style对象湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业五、添加、删除图层v如何添加如何添加shp图层?图层? / / 添加Shape文件 / / Shape文件所在的目录 / Shape文件名城,不要后缀,不要目录 public void LoadShapeFile(string ShapeFilePath, string ShapeFileName) De

28、bug.Assert(pMap != null, Map is null); IWorkspaceFactory pWorkFactory = new ShapefileWorkspaceFactoryClass(); IPropertySet pSet = new PropertySetClass(); pSet.SetProperty(DATABASE, ShapeFilePath); IWorkspace pWorkSpace = pWorkFactory.Open(pSet, 0); IFeatureWorkspace pFeatWorkSpace = pWorkSpace as IF

29、eatureWorkspace; IFeatureClass pFeatClass = pFeatWorkSpace.OpenFeatureClass(ShapeFileName); ILayer pLayer = new FeatureLayerClass(); (pLayer as IFeatureLayer).FeatureClass = pFeatClass; pMap.AddLayer(pLayer); 湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业五、添加、删除图层v如何添

30、加如何添加Access数据库数据?数据库数据? / / 装载Access数据库数据 / / Access数据库文件名称 / 需要装载的图层名称 public void LoadAccessLayer(string AccessFileName, string FeatClassName) Debug.Assert(pMap != null, Map is null); IWorkspaceFactory pWorkFactory = new AccessWorkspaceFactoryClass(); IPropertySet pSet = new PropertySetClass(); pS

31、et.SetProperty(DATABASE, AccessFileName); IWorkspace pWorkSpace = pWorkFactory.Open(pSet, 0); IFeatureWorkspace pFeatWorkSpace = pWorkSpace as IFeatureWorkspace; IFeatureClass pFeatClass = pFeatWorkSpace.OpenFeatureClass(FeatClassName); ILayer pLayer = new FeatureLayerClass(); (pLayer as IFeatureLay

32、er).FeatureClass = pFeatClass; pMap.AddLayer(pLayer); 湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业五、添加、删除图层v如何添加如何添加Coverage数据?数据? / / 装载Coverage数据 / / Coverage数据所在的目录名称 / Coverage图层名称,不包含后缀 public void LoadCoverageLayer(string CoverageFilePath, string FeatClassName

33、) Debug.Assert(pMap != null, Map is null); IWorkspaceFactory pWorkFactory = new ArcInfoWorkspaceFactoryClass(); IPropertySet pSet = new PropertySetClass(); pSet.SetProperty(DATABASE, CoverageFilePath); IWorkspace pWorkSpace = pWorkFactory.Open(pSet, 0); IFeatureWorkspace pFeatWorkSpace = pWorkSpace

34、as IFeatureWorkspace; IFeatureClass pFeatClass = pFeatWorkSpace.OpenFeatureClass(FeatClassName); ILayer pLayer = new FeatureLayerClass(); (pLayer as IFeatureLayer).FeatureClass = pFeatClass; pMap.AddLayer(pLayer); 湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业五、添加、删除图

35、层v如何添加装载图片文件?如何添加装载图片文件? / / 装载图片文件 / / 图片所在的目录名称 / 图片文件名称 public void LoadImageLayer(string ImageFilePath, string ImageFileName) Debug.Assert(pMap != null, Map is null); IWorkspaceFactory pWorkFactory = new RasterWorkspaceFactoryClass(); IPropertySet pSet = new PropertySetClass(); pSet.SetProperty(

36、DATABASE, ImageFilePath); IRasterWorkspace rasterWorkspace = pWorkFactory.Open(pSet, 0) as IRasterWorkspace; IRasterDataset rasterDS = rasterWorkspace.OpenRasterDataset(ImageFileName); ILayer pLayer = new RasterLayerClass(); (pLayer as IRasterLayer).CreateFromDataset(rasterDS); pMap.AddLayer(pLayer)

37、; 湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业五、添加、删除图层v如何装载如何装载SDE图层?图层? / / 装载SDE图层 / / 服务器名称 / SDE实例名称 / 数据库名称 / 用户名称 / 用户口令 / SDE版本 / 需要装载的FeatuerClass的名称 / 图层过滤条件 public void LoadSDELayer(string ServerName, string InstanceName, string DbName, string UserName, s

38、tring Password,string SdeVersion, string FeatClassName,string Filter) Debug.Assert(pMap != null, Map is null); IPropertySet pSet = new PropertySetClass(); pSet.SetProperty(Server, ServerName); pSet.SetProperty(Instance, InstanceName); pSet.SetProperty(Database, DbName); pSet.SetProperty(user, UserNa

39、me); pSet.SetProperty(password, Password); pSet.SetProperty(version, SdeVersion); LoadSDELayer(pSet, FeatClassName,Filter); 湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业五、添加、删除图层v如何装载如何装载SDE图层?图层? public void LoadSDELayer(IPropertySet pSet, string FeatClassName, stri

40、ng Filter) Debug.Assert(pMap != null, Map is null); IWorkspaceFactory pWorkFactory = new SdeWorkspaceFactoryClass(); IWorkspace pWorkSpace = pWorkFactory.Open(pSet, 0); IFeatureWorkspace pFeatWorkSpace = pWorkSpace as IFeatureWorkspace; IFeatureClass pFeatClass = pFeatWorkSpace.OpenFeatureClass(Feat

41、ClassName); ILayer pLayer = new FeatureLayerClass(); (pLayer as IFeatureLayer).FeatureClass = pFeatClass; IFeatureLayerDefinition pLayerDef =pLayer as IFeatureLayerDefinition; pLayerDef.DefinitionExpression = Filter; pMap.AddLayer(pLayer); 湖南湖南城市学院城市学院GIS二次开发二次开发使用使用ArcGIS Engine 9.3市政与测绘工程学院地理信息系统专业市政与测绘工程学院地理信息系统专业六、图层控制v如何理解图层控制?如何理解图层控制? 地图是由多个图层按一定的顺序叠加起来的,通过索引值或图层名称可获取指定的图层,如:ILayer pLayer=axMapControl1.get_Layer(index)ILayer pLayer=axMapControl1.get_Layer(layername) 图层移动:IMap接口的MoveLayer方法; 图层可见性:ILayer接口的Visible属性。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 办公、行业 > 各类PPT课件(模板)
版权提示 | 免责声明

1,本文(ArcGIS-Engine-中的地图组成及图层控制解析课件.ppt)为本站会员(三亚风情)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|