ArcGlobe三维开发之四——设置globe图层的缓存属性)
来源:互联网 发布:php safe mode 开关 编辑:程序博客网 时间:2024/04/30 04:09
原文:Disk caching creates a temporary file or cache for each layer in ArcGlobe, which helps you display and navigate your data efficiently. This topic shows how to set layer cache properties programmatically.
译文:磁盘缓存为ArcGlobe里的每一个图层创建一个临时文件或缓存文件,这些缓存将有利于有效的显示和漫游你的数据。这个topic教你如何通过编程来设置图层的缓存属性。
原文:
Setting globe layer cache properties
- Properly initialize the following variables:
- ESRI.ArcGIS.GlobeCore.IGlobeDisplay pGlobeDisplay
- ESRI.ArcGIS.Carto.ILayer pLayer—The layer for which the cache properties have to be set
- To set the layer cache properties, you need a handle to ESRI.ArcGIS.GlobeCore.IGlobeLayerProperties2 for the layer. See the following code example:
- The ESRI.ArcGIS.GlobeCore.IGlobeLayerProperties2 interface exposes all the methods and properties that can be used to get and set the globe layer's cache properties. The following code example shows how to set the lossy compression option (Joint Photographics Experts Group [JPEG] or DirectX Texture Compression [DXT]) for raster layers:
- Set the option to reduce the number of bits used to display colors for an image. See the following code example:
- Set the minimum cell size (in meters) for raster layers. See the following code example:
- Set the cache removal options. See the following code example:
- Once the layer properties have been set, refresh the layer. See the following code example:
译文:1、首先初始化IGlobeDisplay和ILayer对象。
2、设置图层的缓存属性,需要操作IGlobeLayerProperties2接口
3、IGlobeLayerProperties2 接口提供了所有可以用来获取和设置globe图层的缓存属性的方法和属性。下面的代码展示了如何设置栅格图层的有损压缩选项(JPEG或者DXT)
4、设置选项以减少一幅图像颜色显示的位数。
5、设置栅格图层的最小分辨率
6、设置缓存的移除选项
7、一旦图层属性设置完成,刷新图层。
IGlobeDisplayLayers globeDisplayLayers = pGlobeDisplay as IGlobeDisplayLayers;//获取IGlobeLayerProperties.(第二步)IGlobeLayerProperties globeLayerProperties = globeDisplayLayers.FindGlobeProperties (pLayer);IGlobeLayerProperties2 globeLayerProperties2 = globeLayerProperties as IGlobeLayerProperties2;//(第三步)Set the lossy compression option (JPEG or DXT) for raster layers.globeLayerProperties2.CacheCompressionType = esriTextureFormatType.esriTextureJPEG;globeLayerProperties2.PutLossyCompressionOption(true, 50);//(第四步)Set the option to reduce the number of bits used to display colors for an image.globeLayerProperties2.Use16ColorBits = true;//第五步 Set the minimum cell size (in meters) for raster layers.(设置栅格图层的最小分辨率,以米为单位)globeLayerProperties2.MinimumCellSize = 1;//(第六步)Set the cache removal options.globeLayerProperties2.CacheRemovalOption = esriGlobeLayerCacheRemovalOption.esriGlobeLayerExitRemoval;//Refresh the layer.globeDisplayLayers.RefreshLayer(pLayer);
0 0
- ArcGlobe三维开发之四——设置globe图层的缓存属性)
- ArcGlobe三维开发之五——获取并设置Globe图层的叠加次序
- ArcGlobe三维开发之十八——纵断面图的绘制
- ArcGlobe三维开发之十九——GlobeControl与MapControl的二三维联动
- ArcGlobe三维开发之一——图层及常用接口
- ArcGlobe三维开发之十五——使用对话框设置坐标参考系(ISpatialReferenceDialog2)
- ArcGlobe三维开发之二——IGlobeLayerProperties接口
- ArcGlobe三维开发之六——动画(前言)
- ArcGlobe三维开发之十——IGlobeDisplayRendering2 接口
- ArcGlobe三维开发之十三——加载保存动画
- ArcGlobe三维开发之十七——书签
- ArcGlobe三维开发之七————动画的两种实现方式
- ArcGlobe三维开发之三——3D符号的现实单位显示
- ArcGlobe三维开发之二十——输电线路二三维交互选线
- ArcGlobe三维开发之八————由指定路径创建动画(接口)
- ArcGlobe三维开发之九————由指定路径创建动画(实现)
- ArcGlobe三维开发之十四————播放动画
- ArcGlobe三维开发之十一——3D符号化(接口)
- Libgd实现透明度动作,即实现Actions.alpha方式
- Linux内核链表的浅析和模拟
- Shiro 注解的使用
- 【DP】Decode Ways
- IOS 创建计算器
- ArcGlobe三维开发之四——设置globe图层的缓存属性)
- 上拉下拉刷新终结版---你需要替换的地方
- JS面向对象编程基础部分(2) 3.31
- 一些运维问题
- 用tcpdump在android上抓包
- CSDN 2014 开源技术大会实录
- 23种设计模式之python实现--Bridge模式
- IOS和OC面试题
- 遥望东方,那是新月还是残月——腾讯面试记