码迷,mamicode.com
首页 > 其他好文 > 详细

ArcEngine做栅格数据拉伸

时间:2015-12-07 17:56:39      阅读:109      评论:0      收藏:0      [点我收藏+]

标签:

//获得已打开的栅格数据

IRasterLayer rasterLayer = new RasterLayerClass();
rasterLayer = (IRasterLayer)axMapControl1.Map.Layer[0];
//实现渲染接口。单波段影像用IRasterRenderer接口足够,多波段影像用IRasterRGBRenderer接口。
IRasterRenderer rasterRender = new RasterRGBRendererClass();
rasterRender.Raster =rasterLayer.Raster;
IRasterRGBRenderer rasterRGBRender = rasterRender as IRasterRGBRenderer;
rasterRender.Update();
IRasterStretch2 rasterStretchType = rasterRGBRender as IRasterStretch2;
//esriRasterStretchTypesEnum是枚举类型,包含多个拉伸方式
rasterStretchType.StretchType = esriRasterStretchTypesEnum.esriRasterStretch_Custom;
rasterStretchType.StandardDeviationsParam = 2; //方差
rasterStretchType.StretchStatsType = esriRasterStretchStatsTypeEnum.esriRasterStretchStats_AreaOfView;
 
rasterLayer.Renderer = rasterRGBRender as IRasterRenderer;
axMapControl1.Refresh();

ArcEngine做栅格数据拉伸

标签:

原文地址:http://www.cnblogs.com/lovebay/p/5026395.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!