1

I'm getting some strange numbers out of a GRIB file (from a different source than others we process) and am not experienced enough with GRIB and GDAL to quite understand what is going on.

If I call GetProjectionRef I receive this:

GEOGCS["Coordinate System imported from GRIB file",DATUM["unknown",SPHEROID["Sphere",6367470,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]

That would suggest to me that I should we working in lat/lon degrees. However, when I call GetGeoTransform I receive

[0] -2047.4836475
[1] -1E-06
[2] 0
[3] 74.9999995
[4] 0
[5] 1E-06

This seems inconsistent to me, particularly given that I know the top left corner of the raster should be at 75N 100W. The longitude of the transform appears to be correct, but all the rest are a mystery to me.

I also queried it with a different library (grib.api) and it also has trouble computing coordinates for the data, and lists the x and y direction stepsizes as "MISSING". However, if I open the GRIB file in the Panoply viewer, it seems to have no problems.

Am I overlooking something obvious (almost certainly!) or is the file ill-formed?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.