C#+AE 插值

简介: ///         /// 要插值的要素类,插值的字段名,阈值,栅格大小,指数        ///         ///         ///         ///         ///         ///         ///        public IGeoData...

 /// <summary>
        /// 要插值的要素类,插值的字段名,阈值,栅格大小,指数
        /// </summary>
        /// <param name="_pFeatureClass"></param>
        /// <param name="_pFieldName"></param>
        /// <param name="_pDistance"></param>
        /// <param name="_pCell"></param>
        /// <param name="_pPower"></param>
        /// <returns></returns>

       public IGeoDataset IDW(IFeatureClass _pFeatureClass, string _pFieldName, double _pDistance, double _pCell, int _pPower)
       {
           IGeoDataset Geo = _pFeatureClass as IGeoDataset;

           object pExtent = Geo.Extent;

           object o = Type.Missing;

           IFeatureClassDescriptor pFeatureClassDes = new FeatureClassDescriptorClass();

           pFeatureClassDes.Create(_pFeatureClass, null, _pFieldName);


           IInterpolationOp pInterOp = new RasterInterpolationOpClass();

           IRasterAnalysisEnvironment pRasterAEnv = pInterOp as IRasterAnalysisEnvironment;


          // pRasterAEnv.Mask = Geo;


           pRasterAEnv.SetExtent(esriRasterEnvSettingEnum.esriRasterEnvValue, ref pExtent, ref o);


           object pCellSize = _pCell;//可以根据不同的点图层进行设置


           pRasterAEnv.SetCellSize(esriRasterEnvSettingEnum.esriRasterEnvValue, ref pCellSize);


           IRasterRadius pRasterrad = new RasterRadiusClass();

           object obj = Type.Missing;

           pRasterrad.SetFixed(_pDistance, ref obj);

           object pBar = Type.Missing;

           IGeoDataset pGeoIDW = pInterOp.IDW(pFeatureClassDes as IGeoDataset, _pPower, pRasterrad, ref pBar);

           return pGeoIDW;

 

       }

相关文章
|
定位技术 C#
AE中画点线面查询小结(C#)
 如皋项目开发基本结束,终于有时间总结整理下老。      首先从最基本的查询开始,先写空间查询部分。理下思路:选择绘图工具(点、线、框、面)-->操作地图-->高亮显示地物-->列出查询结果对话框-->单击某条记录,高亮居中显示-->地图清屏(1)选择绘图工具,操作地图。
1039 0