How to set globe layer cache properties(如何设置globe图层的缓存属性)
2014-04-03 19:43
405 查看
原文: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教你如何通过编程来设置图层的缓存属性。
原文:
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、一旦图层属性设置完成,刷新图层。
译文:磁盘缓存为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);
相关文章推荐
- How to get and set the drawing order of layers in globe(获取并设置Globe图层的叠加次序:)
- 如何用th:attr标签在thymeleaf模板中设置属性-原标题:How To Set Attributes in Thymeleaf Template using th:attr?
- how to set ImageView fillet 如何设置ImageView为圆角(iOS)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- ArcGlobe三维开发之四——设置globe图层的缓存属性)
- 如何设置ListViewCtrl的最小列宽(How to set a minimum column width)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel) UIManager
- 如何在ArcGlobe中实现zoomtolayer (How to zoom to layer in globe)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- 如何设置Java桌面程序界面外观(How to Set the Look and Feel)
- [转]how to programatically access built-in properties of open xml word doc(如何读取open xml格式文档属性)
- 如何在ArcGlobe中实现zoomtolayer (How to zoom to layer in globe)
- #114 – How Dependency Properties Are Implemented(依赖属性是如何应用的)
- CP How-To:如何设置符合强度要求的密码
- magento如何获取产品属性值 How to Obtain Custom Attribute Values in Magento
- centos6.5源码安装和centos7.2使用yum安装httpd后,如何添加模块;以及怎么设置Cache-Control:max-age=?浏览器缓存时间
- 17.1.1 How to Set Up Replication 设置复制: