[gdal-dev] Grib2 Question

Roarke Gaskill roarke.gaskill at weather.com
Tue Nov 7 16:02:07 PST 2017


> Unfortunately given how the GRIB degrib and underlying libaries used are
done, you cannot get metadata without processing the whole file.

Oh, so the OOM would happen even when calling gdalinfo? I was assuming it
was later processing that was getting the OOM.

On Tue, Nov 7, 2017 at 5:58 PM, Even Rouault <even.rouault at spatialys.com>
wrote:

> On mardi 7 novembre 2017 17:45:57 CET Roarke Gaskill wrote:
>
> > It seems inappropriate (even as a quick hack) to put the size check in
> the
>
> > grib parser.
>
>
>
> If we default to knMaxAllloc = INT_MAX, given that *ndpts is g2int, then
> the check will be a no-op. Actually the compiler and/or static analyzers
> will probably complain about that... So INT_MAX - 1 is probably a better
> choice :-)
>
>
>
>
>
> > With the check there, you are not able to run simple utilities
>
> > like gdalinfo on large files. What if I wanted to use gdalinfo to find
> out
>
> > if the file is too big to process?
>
>
>
> Unfortunately given how the GRIB degrib and underlying libaries used are
> done, you cannot get metadata without processing the whole file.
>
>
>
> --
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>



-- 
*Roarke **Gaskill  *|Senior Software Engineer
*e:* roarke.gaskill at weather.com
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171107/e12d4804/attachment.html>


More information about the gdal-dev mailing list