[GRASS5] [bug #2238] (grass) r.series: support for wildcards
in input filenames
Huddleston, John
jhuddleston at itc.nrcs.usda.gov
Wed Dec 3 07:41:03 EST 2003
I did a search and found 558 uses of G_parser in the grass source.
John Huddleston
-----Original Message-----
From: Hamish [mailto:hamish_nospam at yahoo.com]
Sent: Tuesday, December 02, 2003 3:40 PM
To: Glynn Clements
Cc: neteler at itc.it; grass-bugs at intevation.de; grass5 at grass.itc.it;
jhuddleston at itc.nrcs.usda.gov
Subject: Re: [GRASS5] [bug #2238] (grass) r.series: support for wildcards in
input filenames
> > > > It would be nice if r.series would accept wildcards for the
> > > > input maps.
> > > >
...
> > > 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().
...
> > > > e.g.
...
> then G_parser() would do glob expansion, so in Hamish' example, using:
> input=insitu_data.*
> would have the same result as:
> input=insitu_data.001,insitu_data.002,...,insitu_data.052
...
> 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.
I'd just point out that it should have a check against MAXFILES.
[Maybe not in this case, I haven't studied how r.series works]
Moreover, it would be good to have MAXFILES defined globally, such as
with DEFAULT_BG_COLOR, etc.
src/raster/r.patch/cmd/nfiles.h:
---------------------------------------------------------------------
/* The number of cell files that can be patched together.
*
* All cell files will be opened at one time, so this number can not
* be arbitrarily large.
*
* Must be smaller than MAXFILES as defined in src/libes/gis/G.h which
* in turn must be smaller than the operating system's limit.
* (Given by `cat /proc/sys/fs/file-max` in Linux 2.4)
*/
#define MAXFILES 200
---------------------------------------------------------------------
regards,
Hamish
More information about the grass-dev
mailing list