[Qgis-user] Nodata and raster calculator

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Tue Jan 27 11:48:36 PST 2015


Salut JF,

What you are seeing is normal behavior.

The "3.xxx e-38" is, like you say, the normal float default. So your 
question is about the 0.

When you create and expression like 
("Montmorency_DSM_NN5m_17x17_mean11 at 1" <= -0.005 OR 
Montmorency_DSM_NN5m_17x17_mean11 at 1" >= -0.005 ),  this gives you a 
layer with pixels having the value of "1" (satisfies condition) or "0" 
(does not satisfy condition).  If you want more then just a layer with 
"1" and "0" , you multiply the result (a layer kept in memory) by the 
original layer (...*"Montmorency_DSM_NN5m_17x17_mean11 at 1").  Therefore, 
whatever pixel that had a "1", now takes on a new value (from the 
Montmorency layer) and any pixel that had a "0" keeps the zero value.  
If you want "0" to become a "NULL" value, you must do it manually by 
doing a "save as" and adding "0" to the no value data.  You can also add 
and additional no data value under "Layer property/Transparency/No data 
value/Additional value."  This will affect sytle and transparency but 
not raster math (to my knowledge).

I can be reached in  Montréal if you have question.

Bonne chance
Nicolas
514-987-6253




Le 2015-01-27 14:10, jfprieur [via OSGeo.org] a écrit :
> Still get the same error, the masked value is set to 0 while the 
> nodata for the new raster is the usual float default of 3.xxx e-38
>
> Starting to wonder if it is not something stupid like the fact that 
> the french decimal separator is a comma instead of a period or 
> something like that. I tried multiplying by 1.0 in my raster 
> calculator expression to try to force it to the float nodata but same 
> result.
>
> https://docs.google.com/document/d/1_-o9VcjEiyKigyk3xwi1zvxWi_o9NaoQy5XOMakik84/edit?usp=sharing 
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://osgeo-org.1560.x6.nabble.com/Nodata-and-raster-calculator-tp5182962p5184028.html 
>
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267h38 at n6.nabble.com
> To unsubscribe from Quantum GIS - User, click here 
> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4125267&code=bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg==>.
> NAML 
> <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> 
>





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Nodata-and-raster-calculator-tp5182962p5184034.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150127/6163b947/attachment.html>


More information about the Qgis-user mailing list