遥感

使用arcpy把hdf格式的遥感影像转换为TIFF格式

2018-10-10  本文已影响466人  两只cows

import arcpy

import os

try:

    for dirpath, dirnames, filenames in os.walk("D:\\researchdata\\MODISdown\\MYD11A1\\LST2003-2017"): 

        for file in filenames :

            if os.path.splitext(file)[1] == '.hdf':

                arcpy.ExtractSubDataset_management("D:\\researchdata\\MODISdown\\MYD11A1\\LST2003-2017\\"+file, "D:\\researchdata\\MODISdown\\MYD11A1\\TIFF2003-2009\\"+os.path.splitext(file)[0]+".tif", "0")

        break

except:

    print "Extract Subdataset example failed."

    print arcpy.GetMessages()

上一篇 下一篇

猜你喜欢

热点阅读