Reputation: 129
I am trying to extract all layers of the MODIS LAI/FPAR imageries using gdalUTILs library, I am getting this error, could anyone help me out of this I am trying to use
sds <- get_subdatasets('MOD15A2H.A2016289.h28v08.006.2016302012314.hdf')
name <- sds[1]`enter code here`
filename <- 'name/of/output/file.tif'
gdal_translate(sds[1], dst_dataset = filename)
r <- raster(filename)
and the error is
> sds <- get_subdatasets('MOD15A2H.A2016289.h28v08.006.2016302012314.hdf')
Error in split1[[1]] : subscript out of bounds In addition: Warning message: running command '"C:\Program Files (x86)\Boundless\OpenGeo\bin\gdalinfo.exe" "MOD15A2H.A2016289.h28v08.006.2016302012314.hdf"' had a status 1
Upvotes: 1
Views: 589
Reputation: 11
Check the hdf file size. If it's 1 or 2kb then its html error file. I had same issue for MOD15A2H product.
Upvotes: 1