> On Jul 30, 2015, at 9:29 PM, Nyall Dawson <[email protected]> wrote:
> On 31 Jul 2015 11:07 am, "Nick Papadonis" <[email protected] 
> <mailto:[email protected]>> wrote:
> >
> > HI Folks,
> >
> > 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.
> >
> > (“m@1" < 238 AND “m@1" > 213 AND “m@2" < 123 AND “m@2" > 98 AND “m@3" < 125 
> > AND “m@3" < 99) * 1
> 
> Should that last check be "m@3" > 99?
> 
> 

I corrected above to:
(“m@1" < 238 AND “m@1" > 213 AND “m@2" < 123 AND “m@2" > 98 AND “m@3" < 125 AND 
“m@3” > 99) * 1

with the same results which is black output tiff.

I then tried individual expressions for each band as separate steps (sanity 
check):
(“m@1" < 238 AND “m@1" > 213) * 1
(“m@2" < 123 AND “m@2" > 98) * 1
(“m@3" < 125 AND “m@3” > 99) * 1

These all produce a masked image, however masked incorrectly because I’m 
evaluating only a single band in the Raster Calculator.

When I combine evaluation of bands as above or below to pick pixels in color 
range:

 ((“m@1" < 238 AND “m@1" > 210) AND (“m@2" < 123 AND “m@2" > 94) AND (“m@3" < 
130 AND “m@3" > 98)) * 1

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.

Does anyone know if my expression needs correction or the Raster Calculator can 
only evaluate a single band in the expression?

Thanks again,
Nick

> Nyall
> 
> >
> > Unfortunately, when this expression is used the resulting map is black with 
> > no other pixels for the detected color.
> >
> > If I break down this expression to a simple “greater than” line for single 
> > band, then things work.
> >
> > Does anyone know where this expression needs to be corrected?
> >
> > Thanks again,
> > Nick
> > _______________________________________________
> > Qgis-user mailing list
> > [email protected] <mailto:[email protected]>
> > http://lists.osgeo.org/mailman/listinfo/qgis-user 
> > <http://lists.osgeo.org/mailman/listinfo/qgis-user>
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to