[GRASS5] [bug #2740] (grass) i.image.mosaic invoked from GUI fails on both 5.3 and 5.7
Glynn Clements
glynn at gclements.plus.com
Mon Nov 29 18:15:37 EST 2004
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=2740
> -------------------------------------------------------------------------
>
> Subject: i.image.mosaic invoked from GUI fails on both 5.3 and 5.7
>
> Platform: GNU/Linux/i386
> grass obtained from: Mirror of Trento site
> grass binary for platform: Compiled from Sources
>
> Refers to GUI in both Grass 5.3cvs and 5.7cvs, 2004_11_13.
>
> --- 5.7 ---
>
> i.image.mosaic image1=N3350.blue image2=N3350.green image3=N3350.red
>
> ATTENTION: Do not forget to set region properly to cover all images!
>
> Mosaicing four images...
> syntax error, unexpected '(', expecting '='
> Parse error
> tail: /home/grassdata/odrautm/wiz/colr/(null): No such file or directory
> Ready. File N3350.blue.N3350.green.N3350.red.(null).mosaic created.
Right. i.image.mosaic checks whether the $GIS_OPT_* variables are
empty to determine if the option was supplied. But an omitted option
results in the variable having the value "(null)" rather than empty.
This is a bug in g.parser. Patch attached.
--
Glynn Clements <glynn at gclements.plus.com>
-------------- next part --------------
--- general/g.parser/main.c~ 2004-11-09 14:08:27.000000000 +0000
+++ general/g.parser/main.c 2004-11-29 23:14:03.000000000 +0000
@@ -290,7 +290,7 @@
for (option = ctx.first_option; option; option = option->next_opt)
{
char buff[1024];
- sprintf(buff, "GIS_OPT_%s=%s", option->key, option->answer);
+ sprintf(buff, "GIS_OPT_%s=%s", option->key, option->answer ? option->answer : "");
putenv(G_store(buff));
}
More information about the grass-dev
mailing list