李旭分享 http://blog.sciencenet.cn/u/lixujeremy 代码与散打爱好者!

博文

ArcPy: Kriging (Spatial Analyst)

已有 7978 次阅读 2015-3-23 16:17 |个人分类:Python|系统分类:科研笔记| Kriging

Kriging is a processor-intensiveprocess. The speed of execution is dependent on the number of points in the input dataset and the size of the search window.

Low values within the optional output variance of prediction raster indicate a high degree of confidence in the predicted value. High values may indicate a need for more data points.

The Universal kriging types assume that there is a structural component present and that the local trend varies from one location to another.

The Advanced Parameters allow control of the semivariogram used for kriging. A default value for Lag size is initially set to the default output cell size. For Major range, Partial sill, and Nugget, a default value will be calculated internally if nothing is specified.

The optional output variance of prediction raster contains the kriging variance at each output raster cell. Assuming the kriging errors are normally distributed, there is a 95.5 percent probability that the actual z-value at the cell is the predicted raster value, plus or minus two times the square root of the value in the prediction raster.

Some input datasets may have several points with the same x, y coordinates. If the values of the points at the common location are the same, they are considered duplicates and have no affect on the output. If the values are different, they are considered 'coincident' points.

The various interpolation tools may handle this data condition differently. For example, insome cases the first coincident point encountered is used for the calculation; in other cases the last point encountered is used. This may cause some locations in the output raster to have different values than what you might expect. The solution is to prepare your data by removing these coincident points. The Collect Events tool in the Spatial Statistics toolbox is useful for identifying any coincident points in your data.

The Kriging Model classes define the kriging method and its parameters that will be used in a kriging interpolation. There are two kriging methods: ordinary and universal.

Ordinary kriging is the most general and widely used of the kriging methods and is the default. It assumes the constant mean is unknown. This is a reasonable assumption unless there is a scientific reason to reject it.

Universal kriging assumes that the spatial variation in z-values is the sum of three components: a structural component (drift), a random but spatially correlated component, and a random noise representing the residual error. The structural component represents a constant trend over the surface. The random noise is assumed to be spatially independent and have a normal distribution. Once the structural effects have been accounted for, the remaining variation is spatially homogeneous such that the z-value difference between input sample points is merely a function of the distance between themas with ordinary kriging.

Understanding a semivariogram—Range, sill, and nugget

As previously discussed, the semivariogram(半变异函数) depicts the spatial autocorrelation of the measured sample points. Because of a basic principle of geography (things that are closer are more alike), measured points that are close will generally have a smaller difference squared than those farther apart. Once each pair of locations is plotted after being binned, a model is fit through them. Range(变程), sill(基台), and nugget(块金) are commonly used to describe these models.

Range and sill

When you look at the model of a semivariogram, you will notice that at a certain distance the model levels out. The distance where the model first flattens is known as the range. Sample locations separated by distances closer than the range are spatially autocorrelated, whereas locations farther apart than the range arenot.

1

The value at which the semivariogram model attains the range (the value on the y-axis) is called the sill. A partial sill is the sill minus the nugget. The nugget is described in the following section.

Nugget

Theoretically, at zero separation distance (for example, lag = 0), the semivariogram value is 0. However, at an infinitely small separation distance, the semivariogram often exhibits a nugget effect, which is a value greater than 0. If the semivariogram model intercepts the y-axis at 2, then the nugget is 2.

The nugget effect can be attributed to measurement errors or spatial sources of variationat distances smaller than the sampling interval (or both). Measurement error occurs because of the error inherent in measuring devices. Natural phenomena can vary spatially over a range of scales. Variation at microscales smaller than the sampling distances will appear as part of the nugget effect. Before collecting data, it is important to gain an understanding of the scales of spatial variation in which you are interested.

Python+Arcpy: Interpolating Using IDW所列数据为例,参照Kriging (Spatial Analyst)编写代码,所得插值结果如图 2,与IDW插值结果有所不同。

2

附上测试数据及代码(shp2interKrig.rar)。




https://blog.sciencenet.cn/blog-1148346-876671.html

上一篇:Matlab: 小波分析—时间序列的多时间尺度分析(2)
下一篇:Matlab: 裁剪图片
收藏 IP: 202.112.90.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-7-6 03:35

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部