[gdal-dev] question about reading grib2 file

Matt Funk mafunk at nmsu.edu
Thu Jan 20 17:19:38 EST 2011


One more comment,

when i use the wgrib2 with the -spread flag i get lat/lon/elevation.
When i use the -text flag instead i only get the elevation (which is the
same data i get through python/gdal).

One thing that did occur to me is that it is possible that the wgrib2
utility computes the lat/lon when given the -spread flag.
Anyway, maybe this is not a gdal issue after all.

thanks
matt


On 1/20/2011 2:38 PM, Matt Funk wrote:
> 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
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



More information about the gdal-dev mailing list