[GRASS-user] i.pca with wildcard input band

Hi there

Is there any way to specify multiple input bands to i.pca? I'm working with aviris data which has 224 bands and it'd be a disaster having to put each band like

i.pca input=band1@PERMANENT,band2@PERMANENT, ..., band224@PERMANENT

I tried input=band*@PERMANENT and it doesn't work.

Thanks a lot.

Peng

On Sun, Nov 22, 2009 at 4:36 PM, Peng Du <du@cs.utk.edu> wrote:

Hi there

Is there any way to specify multiple input bands to i.pca? I'm working with
aviris data which has 224 bands and it'd be a disaster having to put each
band like

Sure, no need to do that. See below:

i.pca input=band1@PERMANENT,band2@PERMANENT, ..., band224@PERMANENT

I tried input=band*@PERMANENT and it doesn't work.

You can pass the output of g.mlist directy as input:

i.pca input=`g.mlist type=rast pattern=band* sep=","` out=...

The backticks in Unix shell execute the enclosed command first.

Or:

LIST=`g.mlist type=rast pattern=band* sep=","`
i.pca input=${LIST} out=...

Markus