zoukankan      html  css  js  c++  java
  • How to set globe layer cache properties(如何设置globe图层的缓存属性)

    原文: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

    1. Properly initialize the following variables:
    2. To set the layer cache properties, you need a handle to ESRI.ArcGIS.GlobeCore.IGlobeLayerProperties2 for the layer. See the following code example:
    3. 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:
    4. Set the option to reduce the number of bits used to display colors for an image. See the following code example:
    5. Set the minimum cell size (in meters) for raster layers. See the following code example:
    6. Set the cache removal options. See the following code example:
    7. 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);
    





  • 相关阅读:
    nginx error_log报错upstream timed out (110: Connection timed out)
    ubuntu12.04 nginx添加ssl认证
    TP5.0:同一个控制器访问不同方法
    TP5.0:的安装与配置
    html常用的小技能
    详情介绍win7:编辑文件夹时提示操作无法完成,因为其中的文件夹或文件已在另一个程序中打开的解决过程
    详细讲解:通过phpstudy 设置站点域名、站点域名管理
    tp3.2.3自定义全局函数的使用
    详细讲解:tp3.2.3生成验证码并进行验证(ajax校验返回及自定义返回)
    WPS去掉英语单词下面的红斜线
  • 原文地址:https://www.cnblogs.com/giser-whu/p/3707076.html
Copyright © 2011-2022 走看看