獲取arcgis克里格插值後的每個點的插值結果

      最近在arcgis克里格插值後需要得到插值後的矩陣。找了很久才找到工具箱中的calculateZvalue,但是一次只能計算一個點,因此需要用腳本去提取。


import arcpy
arcpy.CheckOutExtension("GeoStats")


total=0
points=[]
for width in range(37578564,37636464,50):
    for row in range(3279256,3354160,50):
        point="%d"%width+"  "+"%d"%row#整數轉化爲字符串
        outCZV = arcpy.GACalculateZValue_ga("G:\科研立項\kriginghigher.lyr", point)
       
        addprint=point+"   "+str(outCZV)+"\n"
        points.append(addprint)
           
    myfile = open("C:\\Users\\Administrator\\Desktop\\resultofkrige.txt", "a")
    myfile.writelines( points)
    myfile.close()
    total+=1
    print "第"+str(total)
    points=[]
            
    


    

      

發佈了21 篇原創文章 · 獲贊 4 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章