{"rsdb":{"rid":"179517","subhead":"","postdate":"0","aid":"130289","fid":"91","uid":"1","topic":"1","content":"
\n

\u514b\u91cc\u91d1\u63d2\u503c\u7684\u57fa\u672c\u4ecb\u7ecd\u53ef\u4ee5\u53c2\u8003ARCGIS\u7684\u5e2e\u52a9\u6587\u6863[1]. \u5176\u672c\u8d28\u5c31\u662f\u6839\u636e\u5df2\u77e5\u70b9\u7684\u6570\u503c\uff0c\u786e\u5b9a\u5176\u5468\u56f4\u70b9\uff08\u9884\u6d4b\u70b9\uff09\u7684\u6570\u503c\u3002\u6700\u76f4\u89c2\u7684\u65b9\u6cd5\u5c31\u662f\u627e\u5230\u5df2\u77e5\u70b9\u548c\u9884\u6d4b\u70b9\u6570\u503c\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u4ece\u800c\u9884\u6d4b\u51fa\u9884\u6d4b\u70b9\u7684\u6570\u503c\u3002\u6bd4\u5982IDW\u63d2\u503c\u65b9\u6cd5\uff0c\u5c31\u662f\u5047\u8bbe\u5df2\u77e5\u70b9\u548c\u9884\u6d4b\u70b9\u7684\u503c\u8ddf\u5b83\u4eec\u76f8\u5bf9\u8ddd\u79bb\u6210\u53cd\u6bd4\u3002\u514b\u91cc\u91d1\u63d2\u503c\u7684\u7cbe\u5999\u4e4b\u5904\u5728\u4e8e\u5b83\u4e0d\u4ec5\u8003\u8651\u4e86\u5df2\u77e5\u70b9\u548c\u9884\u6d4b\u70b9\u7684\u8ddd\u79bb\u5173\u7cfb\uff0c\u8fd8\u8003\u8651\u4e86\u8fd9\u4e9b\u5df2\u77e5\u70b9\u4e4b\u95f4\u7684\u81ea\u76f8\u5173\u5173\u7cfb\u3002<\/p> \n

\u5982\u4f55\u8861\u91cf\u5df2\u77e5\u70b9\u4e4b\u95f4\u7684\u81ea\u76f8\u5173\u5173\u7cfb\u5462\uff1f\u901a\u5e38\u4f7f\u7528\u7684\u5c31\u662f\u534a\u53d8\u5f02\u51fd\u6570\uff0c\u5176\u516c\u5f0f\u5982\u4e0b[1]\uff1a<\/p> \n

\n
Semivariogram(distance h) = 0.5 * average((value i \u2013 value j)2)<\/pre> \n <\/div> \n 

\u8fd9\u5c31\u662f\u514b\u91cc\u91d1\u63d2\u503c\u4e0d\u540c\u4e8e\u5176\u4ed6\u63d2\u503c\u65b9\u6cd5\u7684\u6838\u5fc3\u6240\u5728\uff0c\u901a\u8fc7\u8ba1\u7b97\u6bcf\u4e2a\u8ddd\u79bb\u8303\u56f4\u5185\u6240\u6709\u914d\u5bf9\u70b9\u7684\u79bb\u5dee\u5e73\u65b9\u548c\uff0c\u5c31\u53ef\u4ee5\u7ed8\u5236\u51fa\u4e0d\u540c\u8ddd\u79bb\u8303\u56f4\u4e0b\u7684\u53d8\u5dee\u503c\u56fe\uff0c\u5982\u4e0b\u793a\u610f\u56fe[1]\u3002\u6211\u4eec\u77e5\u9053\uff0c\u79bb\u5dee\u5e73\u65b9\u548c\u662f\u8861\u91cf\u4e00\u7ec4\u6570\u636e\u53d8\u5316\u7a0b\u5ea6\u7684\u91cf\uff0c\u800c\u8fd9\u91cc\u901a\u8fc7\u8ba1\u7b97\u6240\u6709\u5df2\u77e5\u70b9\u4e0e\u5176\u4e0d\u540c\u8ddd\u79bb\u8303\u56f4\u5185\u90bb\u5c45\u70b9\u96c6\u7684\u8ddd\u79bb\u79bb\u5dee\u5e73\u65b9\u548c\uff0c\u5c31\u53ef\u4ee5\u5927\u81f4\u8861\u91cf\u51fa\u5df2\u77e5\u70b9\u4e0e\u4e0d\u540c\u8ddd\u79bb\u8303\u56f4\u90bb\u5c45\u70b9\u7684\u53d8\u5316\u7a0b\u5ea6\u5173\u7cfb\uff0c\u901a\u5e38\u7684\u505a\u6cd5\u662f\u8fdb\u884c\u66f2\u7ebf\u62df\u5408\uff0c\u5e38\u7528\u7684\u5305\u62ec\u6307\u6570\u62df\u5408\u3001\u7403\u9762\u62df\u5408\u3001\u9ad8\u65af\u62df\u5408\u7b49\u3002\u800c\u8fd9\u4e2a\u62df\u5408\u7684\u7ed3\u679c\u5c31\u662f\u6211\u4eec\u63d2\u503c\u6240\u9700\u8981\u7684\u5757\u91d1\u503c\u3001\u57fa\u53f0\u503c\u7b49\u3002<\/span><\/p> \n

\"\" \"\"<\/p> \n

\u6ce8\u610f\uff0c\u76ee\u524d\u4e3a\u6b62\u8fd9\u91cc\u53ea\u6d89\u53ca\u5230\u514b\u91cc\u91d1\u63d2\u503c\u662f\u5982\u4f55\u5206\u6790\u5df2\u77e5\u70b9\u4fe1\u606f\uff0c\u4ee5\u53ca\u5982\u4f55\u6784\u9020\u8fd9\u4e9b\u5df2\u77e5\u70b9\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u6574\u4e2a\u63d2\u503c\uff08\u9884\u6d4b\uff09\u8fc7\u7a0b\u5c31\u662f\u5047\u8bbe\u8fd9\u79cd\u5df2\u77e5\u70b9\u4e4b\u95f4\u7684\u5173\u7cfb\uff1a\u8ddd\u79bb\u5173\u7cfb\u548c\u81ea\u76f8\u5173\u5173\u7cfb\uff0c\u5bf9\u4e8e\u9884\u6d4b\u70b9\u540c\u6837\u9002\u7528\uff01<\/p> \n

 <\/p> \n

\u7136\u800c\uff0c\u5728\u6ca1\u6709\u66f4\u591a\u4fe1\u606f\u7684\u524d\u63d0\u4e0b\uff0c\u6211\u4eec\u5982\u4f55\u77e5\u9053\u8fd9\u79cd\u63d2\u503c\u662f\u5426\u53ef\u4fe1\uff1f\u76ee\u524d\u8f83\u4e3a\u5408\u7406\u7684\u65b9\u6cd5\u5c31\u662f\u4ea4\u53c9\u9a8c\u8bc1Cross validation\u3002\u5176\u672c\u8d28\u662f\u62ff\u51fa\u4e00\u4e9b\u5df2\u77e5\u70b9\u4f5c\u4e3a\u9884\u6d4b\u70b9\uff0c\u8fd9\u4e9b\u88ab\u62ff\u51fa\u7684\u70b9\u4e0d\u53c2\u4e0e\u4e0a\u8ff0\u5df2\u77e5\u70b9\u5173\u7cfb\u7684\u63a2\u7d22\u8fc7\u7a0b\uff0c\u800c\u662f\u4f5c\u4e3a\u9a8c\u8bc1\u6570\u636e\u6765\u8861\u91cf\u6211\u4eec\u9884\u6d4b\u662f\u5426\u5408\u7406\u3002\u6bd4\u5982\uff0c\u6211\u4eec\u6bcf\u6b21\u62ff\u51fa\u4e00\u4e2a\u5df2\u77e5\u70b9\u4f5c\u4e3a\u9a8c\u8bc1\u6570\u636e\uff0c\u6765\u9a8c\u8bc1\u8fd9\u4e2a\u70b9\u7684\u9884\u6d4b\u503c\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u6709\u5df2\u77e5\u70b9\u4e0e\u5176\u9884\u6d4b\u503c\u4e4b\u95f4\u7684\u504f\u5dee\uff0c\u8fd9\u4e2a\u6240\u6709\u70b9\u7684\u504f\u5dee\u4ece\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u8bb2\u5c31\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u6574\u4e2a\u9884\u6d4b\u65b9\u6cd5\u662f\u5426\u5408\u7406\u7684\u4f9d\u636e\u3002<\/p> \n

\u4e00\u4e2a\u57fa\u4e8eR gstat\u7a7a\u95f4\u63d2\u503c\u5305\u7684\u793a\u4f8b\uff1a<\/strong><\/p> \n

\u5982\u4e0b\u56fe\uff0c\u5047\u8bbe\u6211\u4eec\u5df2\u77e5\u7684\u6570\u636e\u70b9\u7684\u6805\u683c\u56fe\uff0c\u9700\u8981\u63d2\u503c\u51fa\u5176\u5b83\u9884\u6d4b\u70b9\u7684\u503c\uff08\u767d\u8272\u900f\u660e\u533a\u57df\uff09\uff1a<\/p> \n

\"\"<\/p> \n

\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5c06\u8fd9\u4e2a\u6805\u683c\u6570\u636e\u8bfb\u5165\u5230R\u4e2d(\u9700\u8981\u5b89\u88c5raster\u5305)<\/p> \n

install.packages("raster")<\/p> \n

library(raster)<\/p> \n

data.observed <- raster("C:\/Users\/workspace\/allmax.img")<\/p> \n

\u56e0\u4e3agstat\u90fd\u662f\u4ee5data  frame\u7684\u683c\u5f0f\u8fdb\u884c\u6570\u636e\u5904\u7406\uff0c\u9996\u5148\u6211\u4eec\u7f16\u5199\u4e00\u4e2a\u51fd\u6570\uff0c\u5c06\u8fd9\u4e2a\u6805\u683c\u6570\u636e\u8f6c\u5316\u4e3adata frame\uff1a<\/p> \n

\n
raster_to_dataframe<- function(inRaster, name) # \r\n{\r\n  rp<- rasterToPoints(inRaster)\r\n  df = data.frame(rp)\r\n  colnames(df) = c("X", "Y", "VALUE")\r\n  df$NAME<- name\r\n  return(df)\r\n}\r\n<\/pre> \n <\/div> \n 
name\u53c2\u6570\u53ef\u4ee5\u662f\u968f\u610f\u7684\u5b57\u7b26\u4e32\uff0c\u65b9\u4fbf\u4e0e\u5176\u4ed6data frame\u5408\u5e76\u7684\u65f6\u5019\u8fa8\u522b\u6570\u636e\uff0c\u8fd9\u65f6\u5019\u6211\u4eec\u8c03\u7528\u6b64\u51fd\u6570\uff0c\u5982\u4e0b\uff1a
data.observed <- raster_to_dataframe (data.observed, "Observed") 
\u67e5\u770b\u8f6c\u6362\u4e3adata frame\u7684\u7ed3\u679c\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a
head(data.observed)<\/pre> \n
\n
          X       Y VALUE    NAME\r\n1 -318466.5 3794841    12 Observed\r\n2 -304466.5 3794841    10 Observed\r\n3 -303466.5 3794841     9 Observed\r\n4 -302466.5 3794841    11 Observed\r\n5 -301466.5 3794841     7 Observed\r\n6 -297466.5 3794841    14 Observed\r\n<\/pre> \n <\/div> \n 

\u597d\u4e86\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u8981\u5206\u6790\u8fd9\u5199\u5df2\u77e5\u70b9\uff0cgstat\u63d0\u4f9b\u4e86\u534a\u53d8\u5f02\u56fe\u7ed8\u5236\u51fd\u6570variogram:<\/p> \n

\n
v<- variogram(object = VALUE~1,data = df.wg,locations =~X+Y, width= 200)\r\nplot(v)\r\n<\/pre> \n <\/div> \n 

\"\"<\/p> \n

\u901a\u8fc7\u89c2\u5bdf\uff0c\u5df2\u77e5\u70b9\u7684\u81ea\u76f8\u5173\u5173\u7cfbsemivariance\u968f\u7740\u8ddd\u79bbdistance\u7684\u589e\u52a0\uff0c\u5448\u73b0\u51fa\u6307\u6570\u5f62\u5f0f\u7684\u51cf\u5f31\uff08\u8fd8\u8bb0\u5f97\u5417\uff1f\u79bb\u5dee\u5e73\u65b9\u548c\uff1f\u503c\u8d8a\u5c0f\uff0c\u4ee3\u8868\u5173\u7cfb\u8d8a\u5f3a\uff09\uff0c\u6240\u4ee5\u901a\u8fc7\u89c2\u5bdf\u534a\u53d8\u5f02\u65b9\u5dee\u7684\u5206\u5e03\uff0c\u786e\u5b9a\u4f7f\u7528\u6307\u6570\u6a21\u578b\u6765\u62df\u5408\uff1a<\/p> \n

\n
v.fit = fit.variogram(v, vgm(model = "Exp", psill= 45, range = 20000, kappa = 10),fit.sills = 50)\r\nplot(v, model=v.fit)
v.fit\r\n<\/pre> \n <\/div> \n

\u5982\u4f55\u786e\u5b9apstill, range\u7b49\u521d\u59cb\u503c\u5462\uff0c\u540c\u6837\u901a\u8fc7\u89c2\u5bdf\u5927\u81f4\u7ed9\u51fa\u5373\u53ef\uff0cfit.variogram()\u51fd\u6570\u4f1a\u81ea\u52a8\u8ba1\u7b97\u51fa\u6b63\u786e\u7684\u7ed3\u679c\uff0c\u8fd9\u4e2a\u521d\u59cb\u503c\u5b58\u5728\u7684\u4f5c\u7528\u53ea\u662f\u8f85\u52a9\u8ba1\u7b97\uff0c\u4e0d\u7528\u5341\u5206\u6b63\u786e\uff0c\u5176\u7ed3\u679c\u5982\u4e0b\u56fe\uff1a<\/p> \n

\"\"\u3000\u3000<\/p> \n

 <\/p> \n

 <\/p> \n

\n
model psill range\r\n1 Exp 61.39472 5326.663\r\n<\/pre> \n <\/div> \n 

\u53ef\u4ee5\u770b\u51fa\uff0cR\u8ba1\u7b97\u51fa\u4e86\u65b0\u7684psill\u548crange\u503c\u3002<\/p> \n

\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5229\u7528\u4e0a\u8ff0\u5206\u6790\u7684\u4fe1\u606f\uff0c\u8fdb\u884c\u514b\u91cc\u91d1\u63d2\u503c\u3002\u8fd9\u91cc\u4f7f\u7528\u7684\u662fkrige\u51fd\u6570\uff1a<\/p> \n

\n
kingnewdata<- raster_to_dataframe2(max.allgf, "Interpolate location")\r\naa<- krige(formula = VALUE~1,locations =~X+Y , model = vgm(61.39472, "Exp", 5326.663 , 10) , data = data.observed, newdata= kingnewdata, nmax=12, nmin=10)<\/pre> \n <\/div> \n 

\u53c2\u6570formula\u6307\u51fa\u5df2\u77e5\u70b9\u548c\u5176\u4ed6\u4fe1\u606f\u7684\u5173\u7cfb\uff08\u5047\u5982\u672c\u4f8b\u5df2\u77e5\u70b9\u4ee3\u8868\u571f\u58e4\u542b\u6c34\u91cf\uff0c\u6211\u4eec\u4e5f\u77e5\u9053\u8fd9\u4e9b\u70b9\u5bf9\u5e94\u7684\u964d\u96e8\u4fe1\u606f\uff0c\u90a3\u4e48\u8fd9\u91cc\u7684\u516c\u5f0f\u5c31\u662f\u571f\u58e4\u542b\u6c34\u91cf\u548c\u964d\u96e8\u7684\u7b80\u5355\u7ebf\u6027\u5173\u7cfb\uff09\uff0c\u8fd9\u91cc\u6211\u4eec\u6ca1\u6709\u5176\u4ed6\u4fe1\u606f\uff0c\u5c31\u662f\u666e\u901a\u514b\u91cc\u91d1\u63d2\u503c\u3002\u53c2\u6570location\u662f\u5df2\u77e5\u70b9\u7684\u5750\u6807\uff0c\u8fd9\u91ccX\u4ee3\u8868\u7ecf\u5ea6\uff0cY\u503c\u4ee3\u8868\u7eac\u5ea6\u3002\u53c2\u6570model\u5c31\u662f\u6211\u4eec\u4e0a\u8fb9\u5206\u6790\u7684\u6307\u6570\u6a21\u578b\uff0c\u4f7f\u7528\u62df\u5408\u540e\u7684\u53c2\u6570\u5373\u53ef\u3002data\u8868\u793a\u8981\u4f7f\u7528\u7684\u5df2\u77e5\u70b9\u7684\u6570\u636e\u6846\u3002newdata\u8868\u793a\u8981\u63d2\u503c\u7684\u70b9\u7684\u4f4d\u7f6e\uff0c\u6ce8\u610f\u8981\u5305\u542b\u548cdata\u53c2\u6570\u6240\u4f7f\u7528\u7684dataframe\u4e00\u6837\u7684\u53d8\u91cf\u540d\u79f0\uff08\u672c\u4f8b\u4e2d\u4f4d\u7f6e\u662f\u5927\u5199X\uff0c Y\uff09\uff0cnmax\u548cnmin\u662f\u6700\u591a\u548c\u6700\u5c11\u641c\u7d22\u7684\u70b9\u6570\uff0c\u5176\u4ed6\u53c2\u6570\u5927\u5bb6\u53ef\u4ee5\u53c2\u8003\u5e2e\u52a9\u6587\u6863\uff0c\u63d2\u503c\u7684\u7ed3\u679c\u5982\u4e0b\uff1a<\/p> \n

\"\"<\/p> \n

 <\/p> \n

\u597d\u4e86\uff0c\u6211\u4eec\u5df2\u7ecf\u5b8c\u6210\u4e86\u514b\u91cc\u91d1\u63d2\u503c\u6240\u6709\u4efb\u52a1\u5e76\u4e14\u5f97\u5230\u4e86\u6211\u4eec\u6240\u9700\u8981\u63d2\u503c\u56fe\uff0c\u4f46\u662f\u600e\u4e48\u624d\u80fd\u77e5\u9053\u6211\u4eec\u7684\u63d2\u503c\u7ed3\u679c\u53ef\u4fe1\u4e0e\u5426\u5462\uff1f\u5f53\u7136\uff0c\u5982\u679c\u6211\u4eec\u6709\u9884\u6d4b\u70b9\u7684\u5b9e\u9645\u6570\u636e\uff0c\u6211\u4eec\u53ef\u4ee5\u8bc4\u4ef7\u63d2\u503c\u7ed3\u679c\u7684\u7cbe\u5ea6\uff0c\u4f46\u662f\u5f88\u591a\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u6ca1\u6709\u8fd9\u4e9b\u6570\u636e\uff0ccross validaion\u5e94\u8fd0\u800c\u751f\u3002\u5bf9\u4e8e\u514b\u91cc\u91d1\u63d2\u503c\uff0cgstat\u63d0\u4f9b\u7684cross validation\u51fd\u6570\u662fkrige.cv()\uff0c\u5bf9\u4e8e\u672c\u6587\uff0c\u53ea\u9700\u8981\u5982\u4e0b\u4ee3\u7801\u5373\u53ef\u5b8c\u6210cross validation\uff1a<\/p> \n

\n
kriging<","orderid":"0","title":"R:\u514b\u91cc\u91d1\u63d2\u503c\u53ca\u4ea4\u53c9\u9a8c\u8bc1\u6d45\u6790 Kriging interpolation and cross validation(\u4e00)","smalltitle":"","mid":"0","fname":"R\u8bed\u8a00","special_id":"0","bak_id":"0","info":"0","hits":"9331","pages":"2","comments":"0","posttime":"2017-10-10 12:10:32","list":"1507608632","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/article\/91\/1_xeoo9__.gif","ispic":"1","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"\u514b\u91cc<\/A> \u91d1\u63d2\u503c<\/A> \u4ea4\u53c9<\/A> \u9a8c\u8bc1<\/A> \u6d45\u6790<\/A> Kriging<\/A> interpolation<\/A> and<\/A> cross<\/A> validation<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"113.108.110.181","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"R:\u514b\u91cc\u91d1\u63d2\u503c\u53ca\u4ea4\u53c9\u9a8c\u8bc1\u6d45\u6790 Kriging interpolation and cross validation","lastview":"1713274545","digg_num":"8735","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}