<div dir="ltr">Hi Jonathan:<br><br>Interesting puzzle. You can get what you wish if you use GRASS (r.mapcalc and r.null). With QGIS I just got zero or null, but band by band:<br><br>ZERO : (band1@1<=145)*band1@1<br><br>
NULL : ( ((band1@1<=145)*band1@1) / ((band1@1<=145)*band1@1) ) * band1@1 <br><br>Explanation:<br><br>1. ZERO: When condition in parenthesis is true, it goes 1, if doesn't, 0. After that, multiply by the same band, so result is 0 in cells that original value was major than 145, and it's the same value as original in other cells.<br>
<br>2. NULL: We have same prior value divided by himself. In cells where we got 0, now will get NULL, and the original value in other cells.<br><br>I used 145 according your example. <br><br>Good luck<br><br>Carlos<br><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-21 8:37 GMT-05:00 Jonathan Moules <span dir="ltr"><<a href="mailto:jonathanmoules@warwickshire.gov.uk" target="_blank">jonathanmoules@warwickshire.gov.uk</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi List,
<div>I have a three band raster. I want to do the following with:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
If (Band1 > 150 AND Band2 > 150 AND Band3 > 150){<br> Band1 = 255<br> Band1 = 255<br> Band1 = 255<br>}</blockquote><div><br></div><div>Basically set all band values to 255 when all band values are > than a value of 150. All other band values should remain unchanged.</div>
<div><br></div><div>How do I do this? I've got as far as the below for the :</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
( "CR0569TEI_00008_modified@1" > 145 AND "CR0569TEI_00008_modified@2" > 145 AND "CR0569TEI_00008_modified@3" > 145 ) </blockquote><div><br></div><div>But am unsure what's next. The tutorials I've found online assume I only want 1 or 0 as my results.</div>
<div><br></div><div>Help welcome. :-)</div><div>Thanks,</div><div>Jonathan</div></div>
<br>
<span style="color:rgb(34,34,34);font-family:arial,sans-serif">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.</span><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>