[gdal-dev] identify attribute in GDALRasterBand::RasterBand

Chaitanya kumar CH chaitanya.ch at gmail.com
Mon Mar 14 14:42:24 EDT 2011


Xunlei,

GetMetaData() returns a string list. Each string will contain a metadata
item. You can read the documentation for handling string list at
http://www.gdal.org/cpl__string_8h.html

If you happen to know the name of the metadata item, you can use
GetMetaDataItem().
Ex: GetMetaDataItem("GRIB_SHORT_NAME") may return a string "100000-ISBL".

I think most of your other queries will be resolved when you can read the
metadata.

On Mon, Mar 14, 2011 at 11:37 PM, Xunlei Wu <xunlei at renci.org> wrote:

> Hi All,
>
> I am a novice user of GDAL. I am using GDAL to decode GRIB and GRIB2 files.
> I followed
>
> http://www.gdal.org/gdal_tutorial.html and
> http://www.gdal.org/gdal_datamodel.html. 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?
>
> Thanks a lot for your help.
>
>
>
> Best,
>
> 8gpus
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110315/a3955ad4/attachment.html


More information about the gdal-dev mailing list