http://www.gissky.net- GIS空间站

我要投稿 投稿指南 RSS订阅 网站资讯通告:
搜索: 您现在的位置: GIS空间站 >> 技术专栏 >> ArcGIS >> ArcObjects开发 >> 正文

ArcGis Engine空间插值方法

作者:GIS人    文章来源:本站原创    点击数:    更新时间:2009-9-23
摘要:在ArcGiS Engine(AO)中,提供了IInterpolationOp3接口供空间插值功能,提供的插值方法有IDW、克里格、Spline等,具体如下:
在ArcGiS Engine(AO)中,提供了IInterpolationOp3接口供空间插值功能,提供的插值方法有IDW、克里格、Spline等,具体如下:
Members                  Description
  IDW                                             Interpolates using IDW.
  Krige                                            Interpolates using kriging.
  NaturalNeighbor                             Interpolates using natual neighbor.
  Spline                                           Interpolates using splining.
  TopoToRasterByFile                       Interpolates using AnuDem.
  Trend                                           Interpolates using trend surface.
  TrendWithRms                              Interpolates using trend surface with optional rms file.
  Variogram                                     Interpolates using Variogram.
下面是一个应用举例,注意分析环境的设置:
private void CreateRasterFromPoints()
        {
            //1.将Shape文件读取成FeatureClass
            //2.根据FeatureClass生成IFeatureClassDescriptor
            //3.创建IRasterRaduis 对象
            //设置Cell
            //4.插值并生成表面
            object obj = null;
            AccessFileData af = new AccessFileData([email=Application.StartupPath+@]Application.StartupPath+@"\Business[/email]");
            IFeatureClass featureClass = af.GetFeatureClass("Rain_point");
            IGeoDataset geo = featureClass as IGeoDataset;
            object extend=geo.Extent;
            object o=null;
            IFeatureClassDescriptor feades = new FeatureClassDescriptorClass();
            feades.Create(featureClass, null, "QNData");
            IRasterRadius rasterrad=new RasterRadiusClass();
            rasterrad.SetVariable(12, ref obj);
            object dCell = 0.014800000;//可以根据不同的点图层进行设置
            IInterpolationOp3 interpla = new RasterInterpolationOpClass();
            IRasterAnalysisEnvironment rasanaenv = interpla as IRasterAnalysisEnvironment;
            rasanaenv.SetCellSize(esriRasterEnvSettingEnum.esriRasterEnvValue, ref dCell);
            rasanaenv.SetExtent(esriRasterEnvSettingEnum.esriRasterEnvValue, ref extend, ref o);
            g_GeoDS_Raster = interpla.IDW((IGeoDataset)feades, 2, rasterrad, ref obj);
        }

其中需要注意的事项有:Read the Working with ArcGIS Spatial Analyst objects technical document for general information on implementing Spatial Analyst operations.

Tags:ArcGIS Engine,ColorRamp  
责任编辑:gissky
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 中国地图