[Qgis-user] unable to produce a raster mask
Giacomo
giacomofontanelli76 at gmail.com
Sun Nov 30 04:40:09 PST 2014
Dear Giuseppe
First I have to apologize for the big delay I used to reply you.
Your hint was correct and the map is done.
Thank you very much again!
Spero di rivederti presto.
Giacomo
On 24/11/2014 00:20, Giuseppe Sucameli wrote:
> Ciao Giacomo,
>
> the condition ( "lc_n_italy1 at 1" >= 8 ) is evaluated to either 1 or 0
> depending on the lc_n_italy1 at 1 value.
> so you always get 0 (!) as the second factor is always 0.
>
> Try to set the formula to the following:
> ( "lc_n_italy1 at 1" < 8 ) * "lc_n_italy1 at 1
>
> Best regards.
> Giuseppe
>
>
> On Sat, Nov 22, 2014 at 11:34 AM, Giacomo Fontanelli
> <giacomofontanelli76 at gmail.com <mailto:giacomofontanelli76 at gmail.com>>
> wrote:
>
> Dear community
>
> I start from a raster layer, 8bit unsigned integer. Pixel value
> ranges from 1 to 12.
>
> I would like to mask the pixels with value>8, setting their new
> value to 0.
>
> I used raster calculator with this formula
>
> ( "lc_n_italy1 at 1" >= 8 ) * ("lc_n_italy1 at 1" * 0)
>
> I tried also
>
> ( "lc_n_italy1 at 1" >= 8 ) * 0
>
> but I always obtain a map with only "Nan"
>
> Can you help me?
>
> Thank you
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
>
> --
> Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141130/ccf89314/attachment.html>
More information about the Qgis-user
mailing list