The HDF_READ function extracts Hierarchical Data Format (HDF), HDF-EOS, and NetCDF data and metadata into an output structure based upon information provided through a graphical user interface or through a file template generated by HDF_BROWSER. If you do not specify a template, the HDF Browser dialog opens, allowing you to create one. The HDF_READ function returns an single level output structure that contains elements corresponding to those that were named and read in the HDF Browser dialog. Templates generated by HDF_BROWSER may be re-used for HDF files of identical format.
template = HDF_BROWSER('my.hdf')
output_structure = HDF_READ(TEMPLATE=template)
output_structure = HDF_READ('my.hdf')
output_structure = HDF_READ()
output_structure = HDF_READ('just_like_my.hdf', TEMPLATE=template)
Result = HDF_READ( [Filename] [, DFR8=variable] [, DF24=variable] [, PREFIX=string] [, TEMPLATE =value] )
Returns an output structure containing the specified Hierarchical Data Format (HDF), HDF-EOS, and NetCDF data and metadata.
A string containing the name of a HDF file to extract data from. If Filename is not specified, a dialog allows you to specify a file. Note that if a template is specified, the template must match the HDF file selected.
Set this keyword to a named variable that will contain a 2 x n string array of extracted DFR8 images and their palettes. The first column will contain the extracted DFR8 image names, while the second column will contain the extracted name of the associated palette. If no palette is associated with a DFR8 image the palette name will be set to an empty string. If no DFR8 images were extracted from the HDF file, this returned string will be an empty string array ['', ''].
Set this keyword to a named variable that will contain a string array of the names of all the extracted DF24 24-bit images. This is useful in determining whether a (3,n,m) extracted data element is a 24-bit image or another type of data. If no DF24 24-bit images were extracted from the HDF file, the returned string will be an empty string ('').
When HDF_READ is called without a template, it calls HDF_BROWSER to review the contents of an HDF file and create the default output names for the various data elements. By default, these names begin with a prefix derived from the filename. Set this keyword to a string value to be used in place of the default prefix.
Set this keyword to specify the HDF file template (generated by the function HDF_BROWSER), that defines which data elements to extract from the selected HDF file. Templates may be used on any files that have a format identical to the file the template was created from.