best_Comb.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:GDAL_Python3 作者: jdegene 项目源码 文件源码
def atLoc(mkNameFile,diction,inFol,outFol):
            mkArray = funcs.singleTifToArray(mkNameFile)
            outArray= np.zeros(mkArray.shape)

            for key in diction:
                dictVal = diction[key]
                keyArray = funcs.singleTifToArray(inFol + str(key) + "_rval.tif")

                condlist = [ mkArray == dictVal ]
                choicelist = [ keyArray ]
                outArray = np.select(condlist, choicelist, outArray)

            funcs.array_to_raster(mkNameFile,outArray, outFol+"rval_MK_name_sig2.tif")


#VERY INEFFICIENT -> deprecated:
#iterate over the best_pix Names of Mann Kendall and extract the rvals... of this combination
#return as own raster
#mkNameFile is the Mann-Kendall file to iterate over, inFol contains the rval rasters, 
# diction is a dictionary with short numbers as keys  (the ones in mkNameFile)
#    and long numbers as values
# noData is the value to be skipped as it does not indicate a real combination
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号