<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 30, 2015, at 9:29 PM, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" class="">nyall.dawson@gmail.com</a>> wrote:</div><div class=""><p dir="ltr" class="">On 31 Jul 2015 11:07 am, "Nick Papadonis" <<a href="mailto:npapadonis@gmail.com" class="">npapadonis@gmail.com</a>> wrote:<br class="">
><br class="">
> HI Folks,<br class="">
><br class="">
> I’m trying to use the following expression to pick up the red colored routes on a map in which I used the info pointer tool to get the band values for the color.<br class="">
><br class="">
> (“m@1" < 238 AND “m@1" > 213 AND “m@2" < 123 AND “m@2" > 98 AND “m@3" < 125 AND “m@3" < 99) * 1</p><p dir="ltr" class="">Should that last check be "m@3" > 99?</p><div class=""><br class=""></div></div></blockquote><div><br class=""></div><div>I corrected above to:</div><div>(“m@1" < 238 AND “m@1" > 213 AND “m@2" < 123 AND “m@2" > 98 AND “m@3" < 125 AND “m@3” > 99) * 1</div><div><br class=""></div><div>with the same results which is black output tiff.</div><div><br class=""></div><div>I then tried individual expressions for each band as separate steps (sanity check):</div><div>(“m@1" < 238 AND “m@1" > 213) * 1</div><div>(“m@2" < 123 AND “m@2" > 98) * 1</div><div>(“m@3" < 125 AND “m@3” > 99) * 1</div><div><br class=""></div><div>These all produce a masked image, however masked incorrectly because I’m evaluating only a single band in the Raster Calculator.</div><div><br class=""></div><div>When I combine evaluation of bands as above or below to pick pixels in color range:</div><div><br class=""></div> ((“m@1" < 238 AND “m@1" > 210) AND (“m@2" < 123 AND “m@2" > 94) AND (“m@3" < 130 AND “m@3" > 98)) * 1</div><div><br class=""></div><div>I get a black image with no matches.  I expected at least one pixel identified using this expression because I evaluate a pixel at 224, 108, 115 and there are many other pixels in above range.</div><div><br class=""></div><div>Does anyone know if my expression needs correction or the Raster Calculator can only evaluate a single band in the expression?</div><div><br class=""></div><div>Thanks again,</div><div>Nick</div><div><br class=""><blockquote type="cite" class=""><div class=""><p dir="ltr" class="">Nyall</p><p dir="ltr" class="">><br class="">
> Unfortunately, when this expression is used the resulting map is black with no other pixels for the detected color.<br class="">
><br class="">
> If I break down this expression to a simple “greater than” line for single band, then things work.<br class="">
><br class="">
> Does anyone know where this expression needs to be corrected?<br class="">
><br class="">
> Thanks again,<br class="">
> Nick<br class="">
> _______________________________________________<br class="">
> Qgis-user mailing list<br class="">
> <a href="mailto:Qgis-user@lists.osgeo.org" class="">Qgis-user@lists.osgeo.org</a><br class="">
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" class="">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></p>
</div></blockquote></div><br class=""></body></html>