请问一下克吕金插值时,如何设置栅格数量

0 投票

InterpolationKrigingParameter,Interpolator.Interpolate 在使用克吕金插值时,插值后的结果DatasetGrid中,得到的行和列始终都是4行6列。请问如何设置插值后的栅格数量?或者以公里为单位1公里一个栅格,如:200*200的网格。下边我读取每一个栅格值的方式是否正确?

//下边是我设置的参数,坐标2000经纬度坐标,里边涉及的参数都试过了“Resolution”设置为1,DatasetGrid行和列都是1,设置0.001行和列是4*6(我的数据是这个),0.0001设置后行和列还是4*6。
 

SuperMap.Analyst.SpatialAnalyst.InterpolationKrigingParameter interpolationMethodKrigingParam =
                new SuperMap.Analyst.SpatialAnalyst.InterpolationKrigingParameter(InterpolationAlgorithmType.SimpleKriging);
            interpolationMethodKrigingParam.Resolution = 0.001;
            interpolationMethodKrigingParam.SearchRadius = 12;
            interpolationMethodKrigingParam.ExpectedCount = 285;

            interpolationMethodKrigingParam.SearchMode = SearchMode.KdTreeFixedCount;
            interpolationMethodKrigingParam.Bounds = recordset.Bounds;
             interpolationMethodKrigingParam.VariogramMode = VariogramMode.Spherical;

 DatasetGrid datasetGrid = Interpolator.Interpolate(interpolationMethodKrigingParam, recordset, "BDZ", 1, m_datasource, lineName, PixelFormat.Single);



//以下是读取的栅格每个点值,

 

for (Int32 i = 0; i < datasetGrid.RowBlockCount; i++) {
    for (Int32 j = 0; j < datasetGrid.ColumnBlockCount; j++) {
         double dabcd = datasetGrid.GetValue(j, i);
         num[i, j] = dabcd;
    }
}

10月 25, 2019 分类:  230次浏览 | 用户: jason123456 (1 分)

1个回答

0 投票

您好,建议你参考一下这个链接http://support.supermap.com.cn/SuperMap-iDesktop-Cross/tools/InterpolationAnalysis/OrdinaryKriging.html?Interpolation,Interpolation,结合组件帮助文档接口InterpolationKrigingParameter对插值进行深入理解

10月 25, 2019 用户: 邬袁凯 名扬四海 (2,432 分)
...