[GRASS5] [bug #2238] (grass) r.series: support for wildcards in input filenames
Hamish
hamish_nospam at yahoo.com
Tue Dec 2 17:39:51 EST 2003
> > > > 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