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

Markus Neteler neteler at osgeo.org
Sun Nov 22 11:03:56 EST 2009


On Sun, Nov 22, 2009 at 4:36 PM, Peng Du <du at 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 at PERMANENT,band2 at PERMANENT, ..., band224 at 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


More information about the grass-user mailing list