[Qgis-user] Raster Calculator - If statements

Jonathan Moules jonathanmoules at warwickshire.gov.uk
Fri Feb 21 05:37:14 PST 2014


Hi List,
I have a three band raster. I want to do the following with:

If (Band1 > 150 AND Band2 > 150 AND Band3 > 150){
>   Band1 = 255
>   Band1 = 255
>   Band1 = 255
> }


Basically set all band values to 255 when all band values are > than a
value of 150. All other band values should remain unchanged.

How do I do this? I've got as far as the below for the :

>  ( "CR0569TEI_00008_modified at 1" > 145 AND "CR0569TEI_00008_modified at 2" >
> 145 AND "CR0569TEI_00008_modified at 3" > 145 )


But am unsure what's next. The tutorials I've found online assume I only
want 1 or 0 as my results.

Help welcome. :-)
Thanks,
Jonathan

-- 
This transmission is intended for the named addressee(s) only and may 
contain sensitive or protectively marked material up to RESTRICTED and 
should be handled accordingly. Unless you are the named addressee (or 
authorised to receive it for the addressee) you may not copy or use it, or 
disclose it to anyone else. If you have received this transmission in error 
please notify the sender immediately. All email traffic sent to or from us, 
including without limitation all GCSX traffic, may be subject to recording 
and/or monitoring in accordance with relevant legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140221/6c805722/attachment.html>


More information about the Qgis-user mailing list