[gdal-dev] Grib2 Question

Kurt Schwehr schwehr at gmail.com
Tue Nov 7 20:03:25 PST 2017


I'm pretty sick today, so I'll hold off making the change until tomorrow
(unless anyone wants to beat me to it)

-kurt

On Tue, Nov 7, 2017 at 4:02 PM, Roarke Gaskill <roarke.gaskill at weather.com>
wrote:

> > 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>
>



-- 
--
http://schwehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171107/2fcbbed9/attachment.html>


More information about the gdal-dev mailing list