[gdal-dev] Having problems reading a GRIB2 file with GDAL driver

Rick Wayne fewayne at wisc.edu
Wed Oct 24 10:21:08 PDT 2012


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.

Thanks to you both!

rw

On Oct 23, 2012, at 3:35 PM, Jeff Lake wrote:

> That's a common print out from the GRIB driver
> what are you wanting to do w/ the GRIB file ..
> I might have some better solutions than using GDAL
>

Roger wrote:

> I had the same problem, but with two trailing bytes. [...]
> I solved the problem by removing the bytes using:
>
> dd if=gribFileNameWithTrailingBytes
> of=gribFileNameWithoutTrailingBytes bs=1 skip=0 count=219886
>
> Where count is the original grib file size minus the trailing bytes
> (four, in your case).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121024/29a493f2/attachment.html>


More information about the gdal-dev mailing list