ArcEngine DEM叠加影像
代码执行前:
代码执行后:
影像叠加代码:
/// <summary>
/// 叠加DEM
/// </summary>
/// <param name="pRasterLayer">DEM栅格</param>
/// <param name="pOutRastLay">影像栅格</param>
private void SufraceDEM(IRasterLayer pRasterLayer, IRasterLayer pOutRastLay)
{
IRasterSurface pRasterSurface = new RasterSurface();
pRasterSurface.PutRaster(pRasterLayer.Raster, );
ISurface pSurface = pRasterSurface as ISurface;
ILayerExtensions pLayExtensions = pOutRastLay as ILayerExtensions;
I3DProperties p3DProperties = null;
for (int i = ; i < pLayExtensions.ExtensionCount; i++)
{
if (pLayExtensions.get_Extension(i) is I3DProperties)
{
p3DProperties = pLayExtensions.get_Extension(i) as I3DProperties;
}
}
p3DProperties.ZFactor =; //夸张系数
p3DProperties.BaseOption = esriBaseOption.esriBaseSurface;
p3DProperties.BaseSurface = pSurface;
p3DProperties.Apply3DProperties(pOutRastLay);
}
按钮调用代码:
ILayer pLayer = getLayerByname("dem_project.tif");
IRasterLayer pDemRasterLayer = pLayer as IRasterLayer;
ILayer pImgLayer = getLayerByname("sx_img_3857.tif");
IRasterLayer pImgRasterLayer = pImgLayer as IRasterLayer;
SufraceDEM(pDemRasterLayer, pImgRasterLayer);
axSceneControl1.SceneGraph.RefreshViewers();
getLayerByname方法:
/// <summary>
/// 获取指定图层通过名称
/// </summary>
private ILayer getLayerByname(String name)
{
ILayer layer = null;
int count = axSceneControl1.Scene.LayerCount;
if (count == ) MessageBox.Show("请加载图层");
for (int i = ; i < count; i++)
{
layer = axSceneControl1.Scene.get_Layer(i);
if (name == layer.Name.ToString())
{
break;
}
}
return layer; }
另外扩展一下影像叠加TIN的方法:
/// <summary>
/// 叠加TIN
/// </summary>
private void AddTINSufrace(IRasterLayer pOutRastLay, ITin tin)
{
ITinAdvanced pTINAdvanced = tin as ITinAdvanced;
ISurface pSurface = pTINAdvanced.Surface;
ILayerExtensions pLayExtensions = pOutRastLay as ILayerExtensions;
I3DProperties p3DProperties = null;
for (int i = ; i < pLayExtensions.ExtensionCount; i++)
{
if (pLayExtensions.get_Extension(i) is I3DProperties)
{
p3DProperties = pLayExtensions.get_Extension(i) as I3DProperties;
}
}
p3DProperties.ZFactor =;
p3DProperties.BaseOption = esriBaseOption.esriBaseSurface;
p3DProperties.BaseSurface = pSurface;
p3DProperties.Apply3DProperties(pOutRastLay);
}
TIN叠加调用:
ILayer layer = getLayerByname("Tin");
ITinLayer tinlayer = layer as ITinLayer;
ILayer pImgLayer = getLayerByname("sx_img_3857.tif");
IRasterLayer pImgRasterLayer = pImgLayer as IRasterLayer;
AddTINSufrace(pImgRasterLayer, tinlayer.Dataset);
ArcEngine DEM叠加影像的更多相关文章
- ArcEngine 栅格数据
1.ArcEngine中的栅格数据组织方式(详细信息见:http://resources.arcgis.com/zh-cn/help/main/10.1/index.html#/na/009t0000 ...
- 【FLUENT案例】04:利用DDPM+DEM模拟鼓泡流化床
1 引言2 问题描述3 准备4 FLUENT前处理 1 引言 DEM碰撞模型扩展了DPM模型的功能,能够用于稠密颗粒流动的模拟.该模型可以与DDPM(Dense DPM)模型何用以模拟颗粒对主相的阻碍 ...
- Arcgis, ArcEngine, Arcgis Server使用开发汇总 索引
ArcGIS系列软件license及安装: Arcgis SDE10.1 和 Arcgis server10.1的授权文件license tnt_esri.dat Arcgis8.1安装license ...
- 海拔高度图*.dem文件的读取—vtkDEMReader
vtkDEMReader reads digital elevation files and creates image data. Digital elevation files are produ ...
- geotrellis使用(七)记录一次惨痛的bug调试经历以及求DEM坡度实践
眼看就要端午节了,屌丝还在写代码,话说过节也不给轻松,折腾了一天终于解决了一个BUG,并完成了老板安排的求DEM坡度的任务,那么就分两段来表. 一.BUG调试 首先记录一天的BUG调试,简单copy了 ...
- 关于印发利用DEM确定耕地坡度分级技术规定(试行)的通知
下载:http://files.cnblogs.com/files/gisoracle/%E5%88%A9%E7%94%A8DEM%E7%A1%AE%E5%AE%9A%E8%80%95%E5%9C%B ...
- 【转载】Arcengine效率探究之二——属性的更新
文转载自hymyjl2010<Arcengine效率探究之二——属性的更新> 修改一批要素的属性有多种方法,当数据量较大时,若选择不当可能会大大影响速度. 一.IRowBuffer 方 ...
- 【ESRI论坛6周年征文】ArcEngine注记(Anno/ Label/Element等)处理专题 -入门篇
原发表于ESRI中国社区,转过来.我的社区帐号:jhlong http://bbs.esrichina-bj.cn/ESRI/viewthread.php?tid=122097 ----------- ...
- ArcGIS 10与ArcEngine 10安装及破解
1 2 3 4 5 分步阅读 一键约师傅 百度师傅高质屏和好师傅,拯救你的碎屏机 百度经验:jingyan.baidu.com 现在常见的破解方法在下面的地址中已经详细附图说明了,但是这种破解方法,想 ...
随机推荐
- Gora是一个类似Hibernate的ORM框架
Gora是一个类似Hibernate的ORM框架,但是不只是支持关系数据库,更重要支持NoSQL之类大数据的存储. 支持NoSQL之类大数据的存储 Apache Gora是一个开源的ORM(Objec ...
- Vue 原生动画
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Python--day32--struct模块定制报头理论(什么是网络协议?网络协议的本质是什么?)
- P1073 奇数还是偶数
题目描述 给你 \(N(1 \le N \le 1000)\) 个数,你需要判断每个数是奇数还是偶数. 输入格式 输入的第一行包含一个整数 \(N(1 \le N \le 1000)\) . 接下来 ...
- JS事件委托(代理)学习笔记
在开始之前我们先来熟悉一下HTML DOM addEventListener()方法,该方法用于向指定元素添加事件句柄.语法说明如下图所示: 主要想强调一下第三个参数useCapture,默认值为fa ...
- 备战省赛组队训练赛第六场(UPC)
传送门 外来博客题解1:戳这里 外来博客题解2:戳这里 CRWG全方位题解:戳这里
- poj1080 - Human Gene Functions (dp)
题面 It is well known that a human gene can be considered as a sequence, consisting of four nucleotide ...
- 2019-2-11-WPF-列表自动换行
title author date CreateTime categories WPF 列表自动换行 lindexi 2019-02-11 08:55:31 +0800 2019-02-11 08:5 ...
- 2019-10-12-win10-uwp-非ui线程访问-ui-
title author date CreateTime categories win10 uwp 非ui线程访问 ui lindexi 2019-10-12 15:0:12 +0800 2018-2 ...
- SPA+.NET Core3.1 GitHub第三方授权登录 使用AspNet.Security.OAuth.GitHub
GitHub第三方授权登录 使用SPA+.NET Core3.1实现 GitHub第三方授权登录 类似使用AspNet.Security.OAuth.GitHub,前端使用如下:VUE+Vue-Rou ...