1

I have 332 .HDF files that I have processed in R to convert them to .Tiff. It has worked fine, however, the number of output files are not the same as the number of the input files! Input is 332, output is 328. Does anyone knows why this is happening and how it can be resolved, please?

This is the code i have used for converting:

for (i in 1:length(hdfs)){

setwd("F:\\MODIS\\MOD13Q1.005\\h21v08\\")


reprojectHDF(hdfName       = hdfs[i],               
           filename      = paste(d_temp,"\\",out_names[i],sep = ""),
           MRTpath       =  MRTpath,                                 
           resample_type = "NEAREST_NEIGHBOR",                       
           proj_type     = "GEO",                                    
           bands_subset  = "0 0 1 0 0 0 0 0 0 0 0 0 0",           
           proj_params   = "0 0 0 0 0 0 0 0 0 0 0 0",              
           datum         = "WGS84",                                 
           pixel_size    = 0.004514)}
  • Obviously something goes wrong but with this information it is impossible to tell what. Find out those files which are not converted and study carefully what makes them special. – user30184 May 12 '16 at 7:16
  • Perhaps the source .HDF files that are not processed are corrupt. Try converting them one at a time. – Techie_Gus May 12 '16 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.