[GRASS-user] Python scripts using rules
Luisa Peña
luisapena1979 at gmail.com
Tue Jun 22 08:57:26 EDT 2010
Hi Martin
Maybe I was not clear enough. this is a procedding to be done over each
pixel. Can I apply this sort of code to a pixel based analysis?
2010/6/22 Martin Landa <landa.martin at gmail.com>
> Hi,
>
> 2010/6/22 Luisa Peña <luisapena1979 at gmail.com>:
> > Greetings
> > I'm doing a processing that requires setting rules such as : IF band1> 1
> > output=5 if band<=1 ouput= 3 and if band2>5 output=7. How can I do this
> in a
> > Python script in order to be "almost automatic"?
>
> if band1 > 1:
> output = 5
> else:
> output = 3
>
> if band2 > 5:
> output = 7
>
> Martin
>
> --
> Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100622/8fe8fc32/attachment-0001.html
More information about the grass-user
mailing list