[gdal-dev] Grib2 Question

Roarke Gaskill roarke.gaskill at weather.com
Tue Nov 7 15:45:57 PST 2017


It seems inappropriate (even as a quick hack) to put the size check in the
grib parser. 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?

If it is decided to continue with this quick hack, better logging would be
very helpful.

The number of points in the file I am testing is 67108864

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

> On mardi 7 novembre 2017 15:34:15 CET Kurt Schwehr wrote:
>
> > Why not something like this and just let me pick a small number?
>
> >
>
> > #ifdef GRIB_MAX_ALLOC
>
> > const int knMaxAllloc = GRIB_MAX_ALLOC;
>
> > #else
>
> > const int knMaxAlloc = some massive number;
>
> > #endif
>
> >
>
>
>
> Yes, looks reasonable. I guess "some massive number" should probably be
> INT_MAX if we don't have a better way to do sanity checking right now.
>
>
>
> --
>
> 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/e2655caa/attachment.html>


More information about the gdal-dev mailing list