[GRASS-dev] more interesting failure for reading fp_range of a NULL map

Yann Chemin yann.chemin at gmail.com
Wed Mar 6 19:00:34 PST 2013

On 6 March 2013 23:35, Glynn Clements <glynn at gclements.plus.com> wrote:

> Yann Chemin wrote:
> > dealing with large amount of maps, some of them process to NULL on all
> > pixels.
> > when accessing fp_range in cell_misc, the file is empty, thus returning
> > such an error:
> >
> > WARNING: Unable to read fp range file for <NULL_map_test at PERMANENT>
> >
> > While I understand this is undefined because of all pixels being NULL,
> > would it be possible to have a more interesting output?
> lib/raster/range.c is inconsistent in this regard. When writing an FP
> range, it writes an empty file if the range is null:
>     /* if range hasn't been updated, write empty file meaning Nulls */
> When reading an empty f_range file, it generates the above warning
> (the FPRange structure is initialised with min and max both null).
> It would be a simple matter to change the warning (e.g. "range is
> null") or remove it. A warning might be useful, as I can imagine
> modules failing in interesting ways if an input map is all-null.
In the same way as there is a pixel based function to assess a NULL pixel
it would be very interesting to have a function to test an all NULL raster
map status.

Time series analysis would be the first to benefit.

> --
> Glynn Clements <glynn at gclements.plus.com>

Yann Chemin
Researcher at IWMI
Skype/FB: yann.chemin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20130307/e7dce853/attachment.html>

More information about the grass-dev mailing list