[gdal-dev] can't open grib2 files

Alberto Pettazzi alberto.pettazzi at meteogalicia.es
Mon Jun 29 09:28:19 EDT 2009


Hi Scott,

thank you for your reply! I just have executed the command you suggested me,

gdal-config --formats


and that's what I got:

gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem 
jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk airsar rs2 ilwis 
rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar 
pds adrg coasp tsx terragen blx msgn wcs wms grib bsb jpeg2000 hdf5 hdf4 
gif jpeg png netcdf pcraster rik

So, I guess that I have already built the jpeg2000 support. Any Suggestion?

Alberto Pettazzi


MeteoGalicia - Departamento de Climatología y Observación

Consellería de Medio Ambiente, Territorio e Infraestruturas

Rúa de Roma, 6

15707 Santiago de Compostela. A Coruña


Teléfono: +34-881-999646


e-mail: alberto.pettazzi at meteogalicia.es 
<mailto:alberto.pettazzi at meteogalicia.es>




Scott Sinclair escribió:
>> 2009/6/29 Alberto Pettazzi <alberto.pettazzi at meteogalicia.es>:
>> I am not able to open grib2 files with GDAL. For example, in the attached
>> file
>>
>> http://rapidshare.com/files/249911240/MPE_20090629_0900_M9_00.rar.html
>>
>> I succeed in obtaining information about the file with GDALINFO command, but
>> I cannot convert it into a GTiff (using gdal_translate command). I obtain
>> the following message:
>>
>> Input file size is 3712, 3712
>> 0Segmentation fault
>>
>> I know this file is not corrupted because I can open it with another
>> software. What am I doing wrong?
>>     
>
> Hi Alberto,
>
> GRIB2 files can be compressed using different encoding schemes, the
> GDAL page here (http://www.gdal.org/frmt_grib.html) says
>
> "There are several encoding schemes for raster data in GRIB format.
> Most common ones should be supported including PNG encoding. JPEG2000
> encoded GRIB files will generally be supported if GDAL is also built
> with JPEG2000 support via one of the GDAL JPEG2000 drivers. The JasPer
> library generally provides the best jpeg2000 support for the GRIB
> driver."
>
> It doesn't look like JPEG2000 support is built by default
> (http://www.gdal.org/formats_list.html), so you might need to build
> your own GDAL, if you want to read these files using GDAL. You could
> start by checking whether your GDAL has been built with JPEG2000
> support ('gdal-config --formats' on the command line).
>
> An alternative to access the data is wgrib2
> (http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/), which I've
> used in the past to read the Meteosat precipitation product you're
> dealing with.
>
> Cheers,
> Scott
>
>   


More information about the gdal-dev mailing list