Reputation: 1126
I'm trying to import this file into Matlab, so that I can crop it: http://e4ftl01.cr.usgs.gov/MOLA/MYDOCGA.006/2002.07.04/MYDOCGA.A2002185.h00v08.006.2015149042409.hdf
mypath='C:\Users\Desktop\';
fname='MYDOCGA.A2002185.h00v08.006.2015149042409.hdf';
Band8_Aqua=hdfread([mypath fname],'sur_refl_b08_c');
but it opens the file as a vector, not a matrix.
Upvotes: 0
Views: 197
Reputation: 18484
I think that you need to understand the data format and all of the other information in the file. I don't really know much about this area, but using hdftool
, the following command was suggested:
frame = 'MYDOCGA.A2002185.h00v08.006.2015149042409.hdf';
sur_refl_b08_1 = hdfread(fname, 'MODIS_Grid_2D', 'Fields', 'sur_refl_b08_1');
Then imshow(sur_refl_b08_1)
yields an image. You'll have to explore and learn more yourself. Check out this page, including the learning resources at the bottom.
Upvotes: 1