Xunlei,<br><br>GetMetaData() returns a string list. Each string will contain a metadata item. You can read the documentation for handling string list at <a href="http://www.gdal.org/cpl__string_8h.html">http://www.gdal.org/cpl__string_8h.html</a><br>
<br>If you happen to know the name of the metadata item, you can use GetMetaDataItem().<br>Ex: GetMetaDataItem(&quot;GRIB_SHORT_NAME&quot;) may return a string &quot;100000-ISBL&quot;.<br><br>I think most of your other queries will be resolved when you can read the metadata.<br>
<br><div class="gmail_quote">On Mon, Mar 14, 2011 at 11:37 PM, Xunlei Wu <span dir="ltr">&lt;<a href="mailto:xunlei@renci.org">xunlei@renci.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">Hi All,</p><p class="MsoNormal">I am a novice user of GDAL. I am using GDAL to decode GRIB and GRIB2 files. I followed</p><p class="MsoNormal"> <a href="http://www.gdal.org/gdal_tutorial.html" target="_blank">http://www.gdal.org/gdal_tutorial.html</a> and <a href="http://www.gdal.org/gdal_datamodel.html" target="_blank">http://www.gdal.org/gdal_datamodel.html</a>. However, I still have trouble accessing metadata from a GDALRasterBand object and GDALDataset object. For instance, how do I know the count of Metadata items in the return value of GDALMajorObject::GetMetadata()? I was not sure what to put in as “pszName” in GDALMajorObject::GetMEtadataItem(). And is it the right way to retrieve attributes of a GRIB data file? I know a GRIB file contains at least moisture and pressure at each grid point. I have no idea how to GDAL to identify which GDALRasterBand in GDALDataset and their units for instance. Is there a way to tell the elevation of a particular GDALRasterBand?</p>
<p class="MsoNormal">Thanks a lot for your help.</p><p class="MsoNormal"> </p><p class="MsoNormal">Best,</p><p class="MsoNormal">8gpus</p></div></div><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>