<p dir="ltr">Hi,<br>
The result of you operation will give you a raster with 0 (does not correspond ) and 1 (does correspond). Then you need to multiply result that by 5. You can do it in one shot such as (raster < 2)*5. If you do (raster <2)*raster, the results (1) will be multiplied by the original values of the raster. All other value will be multiplied by 0.</p>
<p dir="ltr">Nicolas Cadieux M.Sc.<br>
Les Entreprises Archéotec inc. <br>
8548, rue Saint-Denis Montréal H2P 2H2<br>
Téléphone: 514.381.5112 Fax: 514.381.4995<br>
www.archeotec.ca</p>
<div class="gmail_quote">Le 2015-04-08 18:30, "Giacomo Fontanelli-2 [via OSGeo.org] " <<a href="/user/SendEmail.jtp?type=node&node=5200514&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> a écrit :<br type='attribution'><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Dear forum<div><br /></div><div>I use QGIS 2.8.1.</div><div><br /></div><div>I have a raster map, Float32, pixel values range from -0.7 to 1.</div><div><br /></div><div>I Would like to make a map with pixel having only two values:</div><div><br /></div><div>pixels with values <= 0 should be 0</div><div><br /></div><div>pixels with values > 0 should be 5.</div><div><br /></div><div>the sintax</div><div><br /></div><div>( "3_NDFI@1" <= 0 ) =0 AND ( "3_NDFI@1" > 0 ) =5<br /></div><div><br /></div><div>doesn't work because it produces a map with only 0 values.</div><div><br /></div><div>In order to reach my goal I must do</div><div><br /></div><div>( "3_NDFI@1" <= 0 ) =0 AND ( "3_NDFI@1" > 0 ) =1<br /></div><div><br /></div><div>then multiply result by 5.</div><div><br /></div><div>What's the problem? </div><div>Is it possible to fulfil the purpose with only one raster operation?</div><div><br /></div><div>Thank you very much</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>
</div>
<br />_______________________________________________
<br />Qgis-user mailing list
<br /><a href="/user/SendEmail.jtp?type=node&node=5200510&i=0">[hidden email]</a>
<br /><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
<br />
<br />
<hr noshade="noshade" size="1" />
<div style="color:#444;font:12px 'tahoma' , 'geneva' , 'helvetica' , 'arial' , sans-serif">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://osgeo-org.1560.x6.nabble.com/making-mistakes-with-raster-calculator-tp5200510.html" target="_top" rel="nofollow" link="external">http://osgeo-org.1560.x6.nabble.com/making-mistakes-with-raster-calculator-tp5200510.html</a>
</div>
<div style="color:#666;font:11px 'tahoma' , 'geneva' , 'helvetica' , 'arial' , sans-serif;margin-top:0.4em;line-height:1.5em">
To start a new topic under Quantum GIS - User, email ml-node+s1560n4125267h38@n6.nabble.com <br />
To unsubscribe from Quantum GIS - User, <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4125267&code=bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg==">click here</a>.<br />
<a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" style="font:9px serif">NAML</a>
</div></blockquote></div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/making-mistakes-with-raster-calculator-tp5200510p5200514.html">Re: making mistakes with raster calculator</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/Quantum-GIS-User-f4125267.html">Quantum GIS - User mailing list archive</a> at Nabble.com.<br/>