[GRASS-dev] [bug #5184] (grass) r.null -n: always creates a null
bitmap - no matter if it already exists
Glynn Clements
glynn at gclements.plus.com
Tue Oct 3 13:35:27 EDT 2006
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5184
> -------------------------------------------------------------------------
>
> Subject: r.null -n: always creates a null bitmap - no matter if it already exists
>
> (filling a bug report for Benjamin Ducke)
>
> Platform: GNU/Linux/x86_64
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> GRASS Version: GRASS 6.1.cvs (2006)
>
> the -n option is supposed to only do work (ie create a null bitmap) if
> the null bitmap doesn't already exist. Currently it always does it.
>
> only_null is the flag option and is only referred to in null.c in the
> following if statement:
>
>
> if(only_null && !G_find_file(element, "null", mapset))
> {
> sprintf (buf, "%s doesn't have null bitmap file! Exiting", name);
> G_warning(buf);
> exit(0);
> }
>
> It should probably be:
>
> if(!only_null && !G_find_file(element, "null", mapset))
> {
> sprintf (buf, "%s doesn't have null bitmap file! Exiting", name);
> G_warning(buf);
> exit(0);
> }
No; according to the flag's description, it should be:
if(only_null && G_find_file(element, "null", mapset))
{
sprintf (buf, "%s already has a null bitmap file! Exiting", name);
G_warning(buf);
exit(0);
}
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list