[GRASS5] [bug #2238] (grass) r.series: support for wildcards in input filenames
H B
hamish_nospam at yahoo.com
Tue Dec 30 01:55:27 EST 2003
> > > It would be nice if r.series would accept wildcards for the input
> > > maps.
> > >
> > > e.g.
> r.series input=insitu_data.* output=insitu_data.stddev method=stddev
> > >
> > > for:
> > > insitu_data.001
> > > insitu_data.002
> > > ...
> > > insitu_data.052
> >
> > That may also true for several other modules; in which case, it
> > might be better to figure out how to build this into G_parser().
> >
> > > such as the g.mremove script does. [0-9] expansions etc would be
> > > nice too, but not critical.
> >
> > g.mremove is a shell script, which makes implementing shell
> > substitutions somewhat easier.
>>
>> r.out.mpeg supports wildcards. Maybe this could be moved somehow
into
>> the parser.
>
> That code (gee_wildfiles()) is a hack; it spawns an "ls" command via
> system() to generate the list of filenames.
>
> The issue isn't figuring out how to implement wildcard expansion;
> that's easy enough to do without using system() hacks. The issue is
> deciding how to make use of it within GRASS.
A possible (temporary) solution: `g.mlist` (just updated in CVS).
for the example above, you might use:
r.series input="`g.mlist pattern='insitu_data.*' sep=,`" \
output=insitu_data.stddev method=stddev
Note the g.mlist script also supports regular expressions for picking
map names, so there's quite a bit of flexability there.
regards,
Hamish
__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003
More information about the grass-dev
mailing list