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);
    





  • 相关阅读:
    线性代数复习向量空间线性相关向量组的秩
    证明:将n(n为2的幂)个点的位反转环划分为长为j(2的幂)的连续片段,这些片段都是次序等价的(分布式算法)
    vim命令小合集
    poj2240floyd算法
    visual studio打开文件所在目录
    5个0,4个1组成的字符串中,出现01或10的次数为4的不同字符串个数
    max spacing kclustering(类似kruskal最小生成树)并查集Debuging
    算法导论16.35huffman树的表示
    最优二叉查找树optimalBSTC++实现2
    算法导论16.37
  • 原文地址:https://www.cnblogs.com/giser-whu/p/3707076.html
Copyright © 2011-2022 走看看