I have 165 hdf files(monthly data) of EVI(Enhanced Vegetation Index) , I need to convert them to a geotiff format. In ArcMap 10.1 I can only extract the data one file at a time.
I have this python code for extracting the data. The problem is it only extracts 11 tiles of one month that covers the study area. Say for example January only. How do I change it so that it accounts for all 165 files at one go.
import arcpy from arcpy import env from arcpy.sa import * arcpy.env.overwriteOutput = 1 arcpy.CheckOutExtension("Spatial") inPath='D:/Input/' outPath='D:/OutPut/' env.workspace = inPath arcpy.env.scratchWorkspace = inPath hdfList = arcpy.ListRasters('*','HDF') for hdf in hdfList: eviName=hdf[8:16] + ".tif" print "Subsetting EVI band from ....."+str(hdf) data1=arcpy.ExtractSubDataset_management(hdf,outPath + hdf[8:16] + ".tif", "1") print "Done"