[gdal-dev] Having problems reading a GRIB2 file with GDAL driver
Even Rouault
even.rouault at mines-paris.org
Wed Oct 24 11:39:02 PDT 2012
Le mercredi 24 octobre 2012 19:21:08, Rick Wayne a écrit :
> Dear Jeff,
>
> I want to import it -- probably tiled and pyramid-ed -- into a PostGIS
> 2.0 raster, to be published with GeoServer. I can use wgrib2 to create
> a CSV file without trouble, so one option would be to use gdal_grid to
> re-create the raster in, say, a GeoTIFF from the CSV. That seems
> rather clunky, and I'm a little concerned about re-interpolating
> already interpolated data. But if the files won't go into the PostGIS
> raster import utility as is, they won't go in.
>
> Roger, I will try hacking the four trailing bytes off the file and see
> whether the result is usable.
I've tested the suggested trick about removing the 4 trailing bytes, and it
indeed removes the warning. Note that using this trick does not seem to be
compulsory, since except the warning, the GRIB driver works just fine on the
original file (I've compared the output of gdalinfo -checksum on the original
and shortened files, and there are identical). So the warning is minor, except
if you use it in a context when outputing stuff on the standard output causes
issues (the low-level library used by the GRIB driver has this nasty habit of
outputting stuff on standard output unfortunately).
More information about the gdal-dev
mailing list