基于Python(Arcpy)批量对遥感影像MK与SEN检验,结果为两张TIF图(MK与SEN)

def mkSen_cal(source_folder,outpt_folder):
    arcpy.CheckOutExtension("spatial")
    arcpy.env.workspace = source_folder
    print "源数据的路径为:"+str(arcpy.env.workspace)
    arcpy.overwriteOutput = True
    arcpy.CheckOutExtension("spatial")
    muti_path = outpt_folder
    print "成果保存的路径为:"+muti_path
    raster_list = arcpy.ListRasters("*","tif")
    print "tif文件的个数:"+str(len(raster_list))
    print raster_list
    sum_array = 0
    n = len(raster_list)

    print "开始求统计量S"
    for j in range(n-1):
        for k in range(j+1,n,1):
        #print str(k)+"--"+str(j)
            raster1 = arcpy.env.workspace + "/"+raster_list[j]
            raster2 = arcpy.env.workspace + "/"+raster_list[k]
            desc1 = arcpy.Describe(raster1)
            desc2 = arcpy.Describe(raster2)

你可能感兴趣的:(ARCPY,Python,算法)