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

Yann Chemin yann.chemin at gmail.com
Wed Mar 6 23:57:47 PST 2013


Hi Hamish,

r.info
------
r.info -r map=nullmap at PERMANENT
min=-nan
max=-nan
WARNING: Unable to read fp range file for <nullmap at PERMANENT>
(Thu Mar  7 13:15:05 2013) Command finished (0 sec)

That is a module level way, i was wondering about a C function like the one
below:

/*A fatal error when NULL map*/
if(Rast_is_null_map(mapname, mapset)<0){
   G_fatal("Input file has only null values");
} else {
  /* do some useful thing */
}


/*A discarding map error when NULL map*/
if(Rast_is_null_map(mapname, mapset)<0){
   G_warning("Input file %s has only null values", mapname);
   /*do not load that map*/
   /*remove that map from the list of temporal iteration*/
} else {
  /* do some useful thing */
}





On 7 March 2013 13:12, Hamish <hamish_b at yahoo.com> wrote:

> Yann:
> > In the same way as there is a pixel based function to assess a
> > NULL pixel value, it would be very interesting to have a
> > function to test an all NULL raster map status.
>
> see 'r.info -r' for overall map, or r.univar for within-region window.
>
>
> ?
> Hamish
>



-- 
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/bdd153b0/attachment.html>


More information about the grass-dev mailing list