HDFread and hdfinfo on modis data

12 visualizzazioni (ultimi 30 giorni)
Joseph Cheng
Joseph Cheng il 5 Giu 2020
Risposto: Joseph Cheng il 5 Giu 2020
I appear to be missing some fundamental understanding of hdfread and hdfinfo for MODIS hdf data files (note not hdf5 files).
Installing the HDFviewer to see the data structure nesting and attributes, i see a disconnect of the struct that is returned for the same file.
In viewing a HDF file with the HDFView 3.1.1
versus
where radiance_offsets are no where visible anywhere in the matlab brought in info to understand what field/index/etc to try to use hdfread with.

Risposta accettata

Joseph Cheng
Joseph Cheng il 5 Giu 2020
Answer to this after brute forcing looking at all named values. attributes that should have been pulled from just reading in similarly to:
info=hdfinfo(file_name)
frame = hdfread(file_name, ...
'MODIS_SWATH_Type_L1B', 'Fields', 'EV_1KM_Emissive',...
'Index',{[1 1 1],[1 1 1],[16 2030 1354]});
can be found further in the main structure info.Vgroup.Vgroup(2).SDS(3).Attributes.
Not clear how i would have found that as both Matlab's HDF import tool or the HDF viewer from hdfgroup explain where these added attributes are. Though HDFimport tool can export the metadata... the code to do so is not included in the dataset impor tcommand though they are displayd in the preview section..... aggrivating but leaving this up so others who are looking to get additional attributes know how deep into the hdfinfo structure they mayhave to go.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by