補間アルゴリズム-クリキン法(Java jk 3 d.jarテストプロセス)


アルゴリズムの紹介 
kriging                         D.G.Krige 1951     ,      、  、         。
                 ,                  ,         。 
 
  

方法步骤

 
  
  1. 输入原始数据,即采样点
  2. 网格化,选择区域的范围和网格的大小,对区域进行网格化处理。
  3. 数据检验与分析,根据采样值是否合乎实际情况,剔除明显差异点。 
  4. 直方图的计算,直方图有助于掌握区域变化的分布规律,以便决定是否对原始数据进行转换。 
  5. 利用变异函数进行变异函数计算,了解变量的空间结构。 
  6. 克里金插值估

源码介绍

java 的第三方库jk3d.jar:由于jk3d.jar网上资料不多,就连github也没有详细资料.所以我在这里会介绍一下某些细节.


1.这个程序的工作过程是这样的:运行时先要加载一个配置文件jk3d.par
内容如下:

Parameters for jk3d
                  *******************

START OF PARAMETERS:
D:\lcpsky-workspace\jk3dstudy\src\testdata-iw3d-3D.dat         -file with data   //      
1   2   3    4     0             -columns for X, Y, Z, var, sec var
-1.0e21   1.0e21                 -trimming limits
0                                -option: 0=grid, 1=cross, 2=jackknife
xvk.dat                          -file with jackknife data
1   2   0    3    0              -columns for X,Y,Z,vr and sec var
3                                -debugging level: 0,1,2,3
testdata-iw3d-3D.dbg             -file for debugging output
testdata-iw3d-3D.out             -file for kriged output                       //      
10 0 0.05                         -nx,xmn,xsiz
10 0 0.05                         -ny,ymn,ysiz
1 0 0.05                         -nz,zmn,zsiz
1    1      1                    -x,y and z block discretization
1    16                          -min, max data for kriging
16    8                           -max per octant (0-> not used), blank if more than this many octants are empty
1.1  1.1  1.1                    -maximum search radii
0.0   0.0   0.0                  -angles for search ellipsoid
1     -1001                      -0=SK,1=OK,2=non-st SK,3=exdrift
0 0 0 0 0 0 0 0 0                -drift: x,y,z,xx,yy,zz,xy,xz,zy
0                                -0, variable; 1, estimate trend
extdrift.dat                     -gridded file with drift/mean
4                                -column number in gridded file
1    0.0                         -nst, nugget effect
3   0.04    0.0   0.0   0.0      \it,cc,ang1,ang2,ang3
   0.994  0.994   0.84            \a_hmax, a_hmin, a_vert
3   0.0336  0.0   0.0  90.0      \it,cc,ang1,ang2,ang3
   0.85 0.85 0.0                 \a_hmax, a_hmin, a_vert

2.この行は、元のデータパス情報を挿入することを意味します.
D:\lcpsky-workspace\jk3dstudy\src\testdata-iw3d-3D.dat         -file with data
     :
primary data
4
X
Y
Z
VAL
0.25	0.0	0.0	0.5949055284903
0.1	0.05	0.0	0.6571611788389199
0.1	0.1	0.0	0.6720057966901514
0.25	0.25	0.0	0.6626711463208254
0.1	0.35	0.0	0.5627861035427689
0.25	0.35	0.0	0.5563930406058681
0.0	0.4	0.0	0.4732733688276998
0.25	0.4	0.0	0.4885665990444264
0.25	0.45	0.0	0.42513590873906865
3.    test 
package com.lcp.jk3dstudy;

import de.onlinehome.geomath.jk3d.jk3d;

public class TestJar {
    public static void main(String[] args){
        
        String path="D:\\lcpsky-workspace\\jk3dstudy\\src\\jd3k.par";//        
        jk3d j=new jk3d(path);
        
   }
}

4. src testdata-iw3d-3D.out

    :
0.0 0.0 0.0 0.6219245209571769
0.05 0.0 0.0 0.6345762187148446
0.1 0.0 0.0 0.6381646522181745
0.15000000000000002 0.0 0.0 0.6319497771084976
0.2 0.0 0.0 0.6167806782810179
0.25 0.0 0.0 0.5949055284903
0.3 0.0 0.0 0.569438255057023
0.35 0.0 0.0 0.5436531889953391
0.39999999999999997 0.0 0.0 0.5203230021261038
0.44999999999999996 0.0 0.0 0.5012775159983296
0.0 0.05 0.0 0.6239400804930038
0.05 0.05 0.0 0.6448814424799691
0.1 0.05 0.0 0.6571611788389199
0.15000000000000002 0.05 0.0 0.6590093905641063
0.2 0.05 0.0 0.650306653477288
0.25 0.05 0.0 0.6325842405218601
0.3 0.05 0.0 0.6086196692370162
0.35 0.05 0.0 0.5817673916757626
0.39999999999999997 0.05 0.0 0.555237870299814
0.44999999999999996 0.05 0.0 0.5315281847611547
0.0 0.1 0.0 0.6223696491745954
0.05 0.1 0.0 0.651340758942806
0.1 0.1 0.0 0.6720057966901514
0.15000000000000002 0.1 0.0 0.681579587961398
0.2 0.1 0.0 0.6790184688269886
0.25 0.1 0.0 0.6652012303162894
0.3 0.1 0.0 0.6426354863089161
0.35 0.1 0.0 0.6148042949443321
0.39999999999999997 0.1 0.0 0.5853715128404784
0.44999999999999996 0.1 0.0 0.5574795965851382
0.0 0.15000000000000002 0.0 0.6157573478153007
0.05 0.15000000000000002 0.0 0.6511534999820636
0.1 0.15000000000000002 0.0 0.6784413963796204
0.15000000000000002 0.15000000000000002 0.0 0.6939968996338469
0.2 0.15000000000000002 0.0 0.696067324366639
0.25 0.15000000000000002 0.0 0.6850895211884048
0.3 0.15000000000000002 0.0 0.6634593806835417
0.35 0.15000000000000002 0.0 0.6348573680511416
0.39999999999999997 0.15000000000000002 0.0 0.6033654208062282
0.44999999999999996 0.15000000000000002 0.0 0.5726434369029081
0.0 0.2 0.0 0.6022129187534695
0.05 0.2 0.0 0.6412178837763904
0.1 0.2 0.0 0.6721373691598452
0.15000000000000002 0.2 0.0 0.6908265372248256
0.2 0.2 0.0 0.6951719106708795
0.25 0.2 0.0 0.6854767971375684
0.3 0.2 0.0 0.6642277394874212
0.35 0.2 0.0 0.6353559583033586
0.39999999999999997 0.2 0.0 0.6032585302909251
0.44999999999999996 0.2 0.0 0.571882952979803
0.0 0.25 0.0 0.5802584260892707
0.05 0.25 0.0 0.6193087218440754
0.1 0.25 0.0 0.6502029311395126
0.15000000000000002 0.25 0.0 0.6686788539550721
0.2 0.25 0.0 0.672668734024263
0.25 0.25 0.0 0.6626711463208254
0.3 0.25 0.0 0.6414468025001332
0.35 0.25 0.0 0.6131807921249314
0.39999999999999997 0.25 0.0 0.582414751565078
0.44999999999999996 0.25 0.0 0.5530843379633157
0.0 0.3 0.0 0.5498124326595705
0.05 0.3 0.0 0.5852907244683542
0.1 0.3 0.0 0.6125955874050529
0.15000000000000002 0.3 0.0 0.6277557141842722
0.2 0.3 0.0 0.6291228369311054
0.25 0.3 0.0 0.617656401740249
0.3 0.3 0.0 0.5964977327960834
0.35 0.3 0.0 0.5700182356822158
0.39999999999999997 0.3 0.0 0.5426863826822507
0.44999999999999996 0.3 0.0 0.5181117226913874
0.0 0.35 0.0 0.5128369677337892
0.05 0.35 0.0 0.5418035477022696
0.1 0.35 0.0 0.5627861035427689
0.15000000000000002 0.35 0.0 0.5724363400723296
0.2 0.35 0.0 0.5697858272771671
0.25 0.35 0.0 0.5563930406058681
0.3 0.35 0.0 0.5357748058407066
0.35 0.35 0.0 0.5123526784425871
0.39999999999999997 0.35 0.0 0.49029406733392555
0.44999999999999996 0.35 0.0 0.4726159425778276
0.0 0.39999999999999997 0.0 0.4732733688276998
0.05 0.39999999999999997 0.0 0.49402181718349203
0.1 0.39999999999999997 0.0 0.5072846835054909
0.15000000000000002 0.39999999999999997 0.0 0.5105338206147851
0.2 0.39999999999999997 0.0 0.5035804501021606
0.25 0.39999999999999997 0.0 0.4885665990444264
0.3 0.39999999999999997 0.0 0.4692673484544011
0.35 0.39999999999999997 0.0 0.4499736856035711
0.39999999999999997 0.39999999999999997 0.0 0.43435650097390677
0.44999999999999996 0.39999999999999997 0.0 0.42467342494719373
0.0 0.44999999999999996 0.0 0.4362001556742045
0.05 0.44999999999999996 0.0 0.4484807220359873
0.1 0.44999999999999996 0.0 0.45409912072384173
0.15000000000000002 0.44999999999999996 0.0 0.4513882226795839
0.2 0.44999999999999996 0.0 0.44087598796298577
0.25 0.44999999999999996 0.0 0.42513590873906865
0.3 0.44999999999999996 0.0 0.4080032746765868
0.35 0.44999999999999996 0.0 0.3934507174740698
0.39999999999999997 0.44999999999999996 0.0 0.38452454801307034
0.44999999999999996 0.44999999999999996 0.0 0.38268179105835376