<div dir="ltr"><div><div>Something is wrong. Let's see:<br><br>1. ("alt@1">0 or "alt@1"=<0) is a logical sentence. If value in a cell complies this condition (it's true) then value will be 1, else 0. So, if you do ("alt@1">0 or "alt@1"=<0)*n, you would have a layer with value "n"<br>
Aaaah, I see: it's the operator. It must be: ("alt@1">0 or "alt@1"<=0): it's better if you use the buttons of calculator raster to make this sentence.<br><br></div>Gook luck<br><br>Carlos<br>
<br></div>Spanish note: Sergio el operador debe ser <=, en QGIS mejor usa los botones de la calculadora para construir la sentencia. Yo probé con un DEM y he tenido buenos resultados en QGIS y GRASS.<br><div><div><div>
<div><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/17 Sergio A Estay <span dir="ltr"><<a href="mailto:sergio.estay@uach.cl" target="_blank">sergio.estay@uach.cl</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi everybody, <br>
    <br>
    I am trying to convert a raster layer "alt" into exp(alt) or
    log(alt). Using the raster calculator it was impossible. Carlos
    Cerdán suggested me this workaround:<br>
    <br>
    1. <b>("alt@1">0 or "alt@1"=<0)*2</b> gets a raster layer
    with value 2 per cell (let's put name =value2).<br>
    <br>
    <div>2. <b>"value2"^"alt@1"</b> must be a layer with each cell
      elevated to some value on "alt@1". If value in cell of "alt@1" is
      big, you get "inf" (infinite?) values<br>
      <br>
      However, in step 1 I obtained a layer with just NaN values (for
      example with the attached layer and many others). Also trying
      2^"alt@1"  I obtained just NaN values. <br>
      <br>
      I tried with grass plugin r.mapcaculator function, but also it
      didn't work.<br>
      <br>
      Any ideas how can I make this operations inside Qgis or Grass? (In
      the meantime I proccess my layers in R without problems, raster
      package).<br>
      <br>
      the link to the example layer: <br>
      <br>
<a href="http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/alt_10m_bil.zip" target="_blank">http://biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/alt_10m_bil.zip</a><br>
      <br>
      best<span class="HOEnZb"><font color="#888888"><br>
    </font></span></div><span class="HOEnZb"><font color="#888888">
    <div><br>
    </div>
    <br>
    <pre cols="72">-- 
Sergio A. Estay
Inst. Ciencias Ambientales y Evolutivas
Universidad Austral de Chile
Casilla 567, Valdivia, Chile
Phone: 5663-293913
<a href="http://www.ciencias.uach.cl/instituto/ciencias_ambientales_evolutivas/academicos/sergio-estay.php" target="_blank">http://www.ciencias.uach.cl/instituto/ciencias_ambientales_evolutivas/academicos/sergio-estay.php</a></pre>

  </font></span></div>

<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>