comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: HDF object/tag retrieval
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: HDF object/tag retrieval [message #55866 is a reply to message #55860] Tue, 18 September 2007 07:26 Go to previous messageGo to previous message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
Dear Jelle,

The following IDL function is designed to extract a single PVL object
from a PVL formatted string, such as the CoreMetadata.0 global
attribute in MODIS HDF files.

ftp://ftp.ssec.wisc.edu/pub/incoming/get_metadata.pro

Here's an example. Note that hdf_sd_attinfo.pro is available from
http://gumley.com/PIP/Free_Software.html.

; Read a global attribute containing global metadata
file = 'MOD021KM.A2000115.1710.002.2000119195542.hdf'
hdfid = hdf_sd_start(file)
info = hdf_sd_attinfo(hdfid, '', 'CoreMetadata.0', /global)
hdf_sd_end, hdfid

; Extract a PVL object
pvlstring = info.data
objstring = 'RANGEBEGINNINGDATE'
result = get_metadata(pvlstring, objstring)
print, result

On a final note, you might be able to find a better tool for creating
GeoTIFF files from the MYD09A1 product. Here are a few options.

HDFLook
http://www-loa.univ-lille1.fr/Hdflook/hdflook_gb.html

MRTSwath
http://edcdaac.usgs.gov/landdaac/tools/mrtswath/

HEG
http://newsroom.gsfc.nasa.gov/sdptoolkit/HEG/HEGHome.html

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: HDF attribute retrieval
Next Topic: Re: Scaling multiple plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 09:48:30 PDT 2025

Total time taken to generate the page: 0.95940 seconds