If I understand the ‘multiple’ option for g.parser, r.patch needs to have this set to yes. You need to be able to enter multiple maps, separated by commas, into the map entry box.
If my understanding is correct, g.rename also needs this. I think that there are several other commands that need this switch, but can’t remember which ones at the moment. I haven’t reported this previously because I guessed it might not work anyway until G.PARSER() was fixed to accept spaces and other characters. I’ll report them as I run into them.
I have a question and I hope you all can excuse my ignorance on this. I thought I’d look at the r.patch command to check whether or not multiple was not set or whether it was set but not working correctly before sending this email. Then maybe I could even offer to make this very minor fix in modules when I ran into this. However, I can’t see where the actual r.patch program is located. It is not in the source directory /grass51/raster/r.patch where I expected it to be. Nor can I find a reference to it in other (what appear to be) likely locations. I could find no reference to g.rename in the source files at all—although it must be there somewhere in order for the module to compile. I’m interested in learning more about how GRASS is put together and seem to be stuck at the beginning.
Michael
Michael Barton, Professor & Curator
School of Human Origins, Cultures, & Societies
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
Michael Barton wrote:
I have a question and I hope you all can excuse my ignorance on this. I
thought I¹d look at the r.patch command to check whether or not multiple was
not set or whether it was set but not working correctly before sending this
email. Then maybe I could even offer to make this very minor fix in modules
when I ran into this. However, I can¹t see where the actual r.patch program
is located. It is not in the source directory /grass51/raster/r.patch where
I expected it to be.
r.patch is unchanged from 5.3. When you run "make mix", the directory
raster/r.patch will be populated with symlinks to the files in
src/raster/r.patch/cmd in the 5.3 source tree (determined by the
argument to the --with-grass50= switch).
And, yes, the "multiple" flag is set:
opt1 = G_define_option() ;
opt1->key = "input";
opt1->type = TYPE_STRING;
opt1->required = YES;
opt1->multiple = YES;
opt1->gisprompt = "old,cell,raster" ;
opt1->description= "Name of raster maps to be patched together" ;
--
Glynn Clements <glynn.clements@virgin.net>
Thanks Glynn.
I was mistakenly under the impression that when the complete GRASS 5.7
source code was released in June, that everything was included in all
subsequent versions. Now I realize that is not the case for the CVS
versions, and much of the code still resides in the 5.3 source files.
Given that multiple = yes for r.patch, why do you think that it doesn't seem
to work? In fact, I don't think it works for any command.
Michael
From: Glynn Clements <glynn.clements@virgin.net>
Date: Wed, 04 Aug 2004 02:54:47 +0100
To: Michael Barton <michael.barton@asu.edu>
Cc: GRASS5 list <grass5@grass.itc.it>
Subject: Re: [GRASS5] r.patch needs 'multiple' switch
Michael Barton wrote:
I have a question and I hope you all can excuse my ignorance on this. I
thought I¹d look at the r.patch command to check whether or not multiple was
not set or whether it was set but not working correctly before sending this
email. Then maybe I could even offer to make this very minor fix in modules
when I ran into this. However, I can¹t see where the actual r.patch program
is located. It is not in the source directory /grass51/raster/r.patch where
I expected it to be.
r.patch is unchanged from 5.3. When you run "make mix", the directory
raster/r.patch will be populated with symlinks to the files in
src/raster/r.patch/cmd in the 5.3 source tree (determined by the
argument to the --with-grass50= switch).
And, yes, the "multiple" flag is set:
opt1 = G_define_option() ;
opt1->key = "input";
opt1->type = TYPE_STRING;
opt1->required = YES;
opt1->multiple = YES;
opt1->gisprompt = "old,cell,raster" ;
opt1->description= "Name of raster maps to be patched together" ;
--
Glynn Clements <glynn.clements@virgin.net>