[gdal-dev] question about reading grib2 file

Matt Funk mafunk at nmsu.edu
Thu Jan 20 16:38:22 EST 2011


Hi,

i am somewhat new to gdal and the grib format.
I need to read in a grib2 file which contains latitude longitude and
elevation.
So i do:
ds = gdal.Open(filename)
and
print "ds.GetRasterCount(): %s" % ds.GetRasterCount()
gives: 1

I can proceed to read in this band, but all the data that i get is the
elevation.
Not sure if this is an incredibly stupid question, but how do i access
the latitude/longitude data?

I know that there is latitude/longitude since when outputting things to
a csv file via the wgrib2 utility i get lat/lon and elevation?

thanks for any advice
matt


More information about the gdal-dev mailing list