Hi, I am facing an issue with GRIB2 data, and the extent reported by a gdal_info command. Here is a sample data to test: https://drive.google.com/file/d/1URvQs2qHXgRkq3YfC7ZR8VGYK3SKXB59/view?usp=drive_link
Here is what I am testing with: * Ubuntu 20.04.6 LTS * GDAL 3.5.2, released 2022/09/02 * PROJ Rel. 8.2.0, November 1st, 2021 So, using grib_dump, I see the longitude of the file should be from 0 to 360 degress: grib_dump out.grib2 | grep shapeOfTheEarth -A 12 shapeOfTheEarth = 6; Ni = 2400; Nj = 1201; iScansNegatively = 0; jScansPositively = 1; jPointsAreConsecutive = 0; alternativeRowScanning = 0; latitudeOfFirstGridPointInDegrees = -90; longitudeOfFirstGridPointInDegrees = 0; latitudeOfLastGridPointInDegrees = 90; longitudeOfLastGridPointInDegrees = 360; iDirectionIncrementInDegrees = 0.15; jDirectionIncrementInDegrees = 0.15; But using gdal_info I see the extent as: gdal_info -proj4 out.grib2 | grep PROJ -A 9 PROJ.4 string is: '+proj=longlat +R=6371229 +no_defs' Origin = (-0.075031263026261,90.075000000000003) Pixel Size = (0.150062526052522,-0.150000000000000) Corner Coordinates: Upper Left ( -0.0750313, 90.0750000) ( 0d 4'30.11"W, 90d 4'30.00"N) Lower Left ( -0.0750313, -90.0750000) ( 0d 4'30.11"W, 90d 4'30.00"S) Upper Right ( 360.075, 90.075) (360d 4'30.11"E, 90d 4'30.00"N) Lower Right ( 360.075, -90.075) (360d 4'30.11"E, 90d 4'30.00"S) Center ( 180.0000000, 0.0000000) (180d 0' 0.00"E, 0d 0' 0.01"N) I would expect the gdal_info extent to be also from 0 to 360 degrees (2400 pixels * 0.15 = 360). From reading various source, I see the issue is potentially that the GRIB2 files define the extent using the center of the pixel while gdal assumes it is the top left corner. My question: Is there a way to change this behavior in gdal, or this expected, or a bug ? Thanks LP
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev