• ArcEngine下SceneControl叠加影像数据(构建三维地形)


    载入完TIN数据后。须要在三维物体上描绘细节。即纹理;建立DEM表面点与纹理空间点的关系,即纹理映射。叠加影像数据就是把影像看作纹理。将其贴在地形表面,让其具有地形起伏的三维效果。

    这里与GlobeControl下三维场景的构建有所不同,在前面的博文中我们提到过,globe下图层主要有三种类型:Floating、Draped、Elevation(浮动、叠加和高程图层),即仅仅须要设置图层的属性就可以。叠加图层与浮动图层从高程图层获取高程值。SceneControl中实现影像的叠加,參照ArcScene中的操作:“右键”——>“属性”——>“基本高度”——>“从表面获取的高程”,设置为浮动在自己定义表面。


    这里主要使用I3DProperties接口,代码例如以下:

                    ISceneGraph pSceneGraph = axSceneControl1.SceneGraph;
                    IScene pScene = pSceneGraph.Scene;
                    ITinLayer pTinLayer = null;
                    IRasterLayer pRasterlayer = null;
                    //获取TIN、DOM
                    for (int i = 0;i < pScene.LayerCount;i++)
                    {
                        ILayer pLayer = pScene.get_Layer(i);
                        if (pLayer is ITinLayer)
                        {
                            pTinLayer = pLayer as ITinLayer;
                        }
                        if (pLayer is IRasterLayer)
                        {
                            pRasterlayer = pLayer as IRasterLayer;
                        }
    
                    }
                    //设置3D属性
                    ITinAdvanced tinAdvanced = pTinLayer.Dataset as ITinAdvanced;
                    ISurface surface = tinAdvanced.Surface;
    
                    ILayerExtensions layerExtensions = pRasterlayer as ILayerExtensions;
                    I3DProperties p3DProperties = null;
    
                    for (int i = 0;i < layerExtensions.ExtensionCount;i++)
                    {
                        if (layerExtensions.get_Extension(i) is I3DProperties)
                        {
                            p3DProperties = layerExtensions.get_Extension(i) as I3DProperties;
                        }
                    }
                    p3DProperties.BaseOption = esriBaseOption.esriBaseSurface;
                    p3DProperties.BaseSurface = surface;
                    p3DProperties.Apply3DProperties(pRasterlayer);

  • 相关阅读:
    [Linux] git send-email的使用
    Linux 下 grep 命令常用方法简介
    Scikit-learn的kmeans聚类
    python 基础知识
    Python
    xgboost 特征选择,筛选特征的正要性
    阿里菜鸟-算法(一面)
    基于Ranking-CNN的年龄识别(CVPR_2017)
    基于多输出有序回归的年龄识别(CVPR_2016)
    在caffe中用训练好的 caffemodel 来分类新的图片所遇到的问题
  • 原文地址:https://www.cnblogs.com/liguangsunls/p/7380912.html
Copyright © 2020-2023  润新知