[gdal-dev] General Questions about gdal usage with Grib1 Data Set

Cassanova, Bill BCassanova at weather.com
Mon Jul 20 13:24:27 EDT 2009


Hi,

I am new to GDal and just beginning to dig into the intricacies of the
library and would like some guidance on the best way to proceed.

I have a data set that is in a grib1 format but with a Lambert Conformal
Projection.  If need be this file can be converted to either grib2 or
shape file using an application called degrib.

My task is given this data-set I need to be able to extract values from
the file for a given lat-lon and don't necessarily want to code the
intricacies of the Lambert-Conformal-SP2 projection.  So in other words
given a lat-lon of 38.59, - 97.61 I want to be able to interrogate the
raster and extract a value for that given coordinate.

There seem to be a few options and just need advice from the season GDAL
guru's of the best way to proceed:

(1)	Convert the lambert-conformal grib1 to a cylindrical equidistant
grib1 or tiff using gdalwarp and do the simpler ratio based math on the
rectangular grid as opposed to the projected grid.

(2)	Use OGRCreateCoordinateTransformation specifying the source as
Lambert Conformal and the destination as cylindrical equidistant.  My
presumption at this point is that the
OGRCoordinateTransformation->Transform( 1, &x, &y ) method call could
take a longitude as the x-argument, and latitude as the y-argument.  A
successful transform call would replace the original lat-lon with the
new lat-lon and from this point the data grid ( I, J ) offsets could be
calculated using simply ratios.
		
(3)	Are they any more direct simpler ways of accomplishing the same
thing?  
		
Thanks in advance for the help,
Bill
		

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090720/a2333890/attachment.html


More information about the gdal-dev mailing list