1、问题背景:

最近项目中获得了一份全球云分布图,客户要求把云显示在全球地图上,出现云的效果,如下图所示:

【全球云分布图】

【世界地图云示意图】

2、解决思路

咨询专业的业务人员,建议我测试下试试地图透明通道,地图底色设置为白色,设置透明通道来完成这个效果,赶紧来试,先用PIE的波段合成功能,成功的将3波段的世界地图.tiff和全球的云分布图合并成一个四波段的带云分布的世界地图,赶紧设置RGBA波段,果然出现了想要的效果。

【波段合成】

【设置渲染方式】

3、实现代码

下一步就是代码实现这个功能了,首先调用波段合成算法,再设置RGBA渲染,大功告成了。

// 波段组合算法调用
PIE.CommonAlgo.BandCombination_Exchange_Info info = new PIE.CommonAlgo.BandCombination_Exchange_Info(); string path = @"D:\Data\World.tif";
IRasterDataset rDataset = DatasetFactory.OpenDataset(path, OpenMode.ReadOnly) as IRasterDataset; string path1 = @"D:\Data\CC_2018082615.tif";
IRasterDataset rDataset1 = DatasetFactory.OpenDataset(path1, OpenMode.ReadOnly) as IRasterDataset; info.m_vecFileptr = new List<IRasterDataset> { rDataset, rDataset1 }; List<int> list1 = new List<int> { , , };
List<int> list2 = new List<int> { };
info.bands = new List<List<int>> { list1, list2 };
info.tstrfile = @"D:\Data\CloudPic.tif";
info.m_strFileTypeCode = "GTiff"; PIE.CommonAlgo.Interestregion interestregion = new PIE.CommonAlgo.Interestregion();
interestregion.SetRegion(, , rDataset.GetRasterYSize(), rDataset.GetRasterXSize());
info.regioninfo = new List<PIE.CommonAlgo.Interestregion> { interestregion, interestregion };
info.m_iOutRangeCrossType = ; PIE.SystemAlgo.ISystemAlgo algo = PIE.SystemAlgo.AlgoFactory.Instance().CreateAlgo("PIE.CommonAlgo.dll", "PIE.CommonAlgo.BandCombinationAlgo");
if (algo == null) return; PIE.SystemAlgo.ISystemAlgoEvents algoEvents = algo as PIE.SystemAlgo.ISystemAlgoEvents;
algo.Name = "波段合成";
algo.Params = info;
bool result = PIE.SystemAlgo.AlgoFactory.Instance().ExecuteAlgo(algo); ILayer layer = PIE.Carto.LayerFactory.CreateDefaultLayer(@"D:\Data\CloudPic.tif");
IRasterRGBRender rRGBRender = new RasterRGBRender();
rRGBRender.SetBandIndices(, , );
rRGBRender.UseAlphaBand = true;
rRGBRender.AlphaBandIndex = ; //设置rasterRender
IRasterRender rasterRender = rRGBRender as IRasterRender;
IRasterLayer rasterLayer = layer as IRasterLayer;
rasterLayer.Render = rasterRender; m_HookHelper.ActiveView.FocusMap.AddLayer(layer); m_HookHelper.ActiveView.PartialRefresh(ViewDrawPhaseType.ViewAll);

利用PIE实现全球云分布图的效果的更多相关文章

  1. [转帖]AWS第一,「3A格局」稳固,活跃IP是如何被全球云厂商瓜分的?

    AWS第一,「3A格局」稳固,活跃IP是如何被全球云厂商瓜分的? 本文作者:王刚 2019-02-24 10:42 https://www.leiphone.com/news/201902/qsz3c ...

  2. Gartner:阿里云位列全球云数据库市场份额前三,数据库未来需上云

    近日,国际权威研究机构Gartner发布 <The Future of the Database Management System (DBMS) Market Is Cloud>报告,鲜 ...

  3. 利用VisualVM监测Azure云服务中的Java应用

    在做Java开发的时候,我们需要在上线之前对程序进行压力测试,对程序的性能进行全面的监控,了解JVM的CPU,内存,GC,classes,线程等等信息,或者在程序上线运行的过程当中以便于诊断问题或者对 ...

  4. 利用 Windows Azure 实现“云优先”

    根据 IDC 的调查,云计算无疑为我们的合作伙伴提供了巨大的机会,预计到 2016 年,全球企业将在公共云服务上耗资 980 亿美元.在今天的休斯敦全球合作伙伴大会上,我们非常高兴能与合作伙伴共同寻求 ...

  5. 利用tween.js算法生成缓动效果

    在讲tween类之前,不得不提的是贝塞尔曲线了.首先,贝塞尔曲线是指依据四个位置任意的点坐标绘制出的一条光滑曲线.它在作图工具或动画中中运用得比较多,例如PS中的钢笔工具,firework中的画笔等等 ...

  6. iOS基本动画/关键帧动画/利用缓动函数实现物理动画效果

    先说下基本动画部分 基本动画部分比较简单, 但能实现的动画效果也很局限 使用方法大致为: #1. 创建原始UI或者画面 #2. 创建CABasicAnimation实例, 并设置keypart/dur ...

  7. CSS3利用一个div实现内圆角边框效果

    *首先要清楚的是,box-shadow的形状会随着border-radius变化.下面的例子可以证明: <!doctype html> <html lang="en&quo ...

  8. requests利用selenium,代理Ip,云打码,验证码抠图操作 爬取搜狗微信公众号内容

    爬取思路,爬取搜狗微信公众号内容,爬取第一层url时请求太快出现验证码,我这里用的蘑菇云代理,并在程序中我判断什么情况下是否+代理,做到合理运用代理ip.爬取第二层url时验证码出现次数更严重(和第一 ...

  9. 利用InformationSchema与阿里云交易和账单管理API实现MaxCompute费用对账分摊统计

    利用MaxCompute InformationSchema与阿里云交易和账单管理API 实现MaxCompute费用对账分摊统计 一.需求场景分析 很多的企业用户选择MaxCompute按量付费模式 ...

随机推荐

  1. i2c_smbs 函数

    i2c_smbus系列函数有: s32 i2c_smbus_read_byte(const struct i2c_client *client); s32 i2c_smbus_write_byte(c ...

  2. 04-树6 Complete Binary Search Tree (30 分)

    A Binary Search Tree (BST) is recursively defined as a binary tree which has the following propertie ...

  3. (转)AIX ODM 简介

    什么是 ODM 原文:https://www.ibm.com/developerworks/cn/aix/library/1105_chenwei_odm/ Windows 的注册表相信大家都知道,是 ...

  4. maevn HelloWorld 基本命令

    总结: Mvn clean compile:编译主代码 Mvn clean test:执行测试代码 Mvn clean package:打包 Mvn clean install: 安装到本地仓库 执行 ...

  5. C#中复制数组

    string array = new string[]{"abc", "bcd", "efg"}; string bArray = new ...

  6. vim操作命令备忘

    vim操作命令备忘 查找/替换 :%s/keyword//gn //搜索匹配的关键词数量 :%s/keywords/target //替换关键词 待续……

  7. ++i? i++? i+=1? i=i+1? 何必纠结?

    前言 今天在牛客上看面经,看到一个问题:num++; num+=1; num = num +1; 哪个效率最高? 自从学习C语言开始,我就在纠结for语言应该写i++,还是++i,其实这个问题,可以通 ...

  8. linux shell学习-1

    今天在使用$()这个命令的时候,如下,一直纳闷为何输出不是 "/usr": 一直在不断换着法子来试,原来是$()会将每个执行的命令单独隔开来的,及时是嵌套的命令,也会在执行逻辑上单 ...

  9. PHP调用百度api生成短网址&根据短网址恢复长网址

    接口api文档地址:http://dwz.cn/#/apidoc?_k=i9ev5p 代码demo header("Content-type: text/html; charset=utf- ...

  10. python 爬虫入门案例----爬取某站上海租房图片

    前言 对于一个net开发这爬虫真真的以前没有写过.这段时间开始学习python爬虫,今天周末无聊写了一段代码爬取上海租房图片,其实很简短就是利用爬虫的第三方库Requests与BeautifulSou ...