<div dir="ltr"><div><div>Hi Andreas:<br><br>I think QGIS raster calculator can make this job. Conditional syntax is a little bit... different.  The sentence that can do it is:<br><br>(TIFF=249)*255 + (TIFF<249)*TIFF + (TIFF>249)*TIFF<br><br>Where TIFF is your raster layer. The trick is: if the sentence in parentheses is true, it gets value 1, else zero; so we have to multiply by 255 to replace the 249 values. Next we have to add the other values. <br><br></div>Good luck,<br><br>Carlos Cerdán<br><br></div>PD. Please let me know if i'm wrong with this suggestion<br><div><div><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-17 12:02 GMT-05:00 Andreas Neumann <span dir="ltr"><<a href="mailto:a.neumann@carto.net" target="_blank">a.neumann@carto.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I have a very simple task (at least I thought it is simple), but am not able to do it properly.<br>
<br>
I have a grayscale tiff value where I would like to replace the value of 249 with 255 - all other values should stay as they are.<br>
<br>
I tried with gdal "nearblack", but nothing changed - I started a separate email-thread about that at the gdal list.<br>
<br>
Then I tried with the QGIS raster calculator - but it does not support conditional syntax.<br>
<br>
I tried with Processing and GRASS - but it would stop at 8% - the file is quite big.<br>
<br>
Finally I came across SAGA "Reclassify with grid value". The dialogue is very complicated and hard to understand. After a while it would stop with an error message telling me that Saga may not be properly configured - but it says that it is properly installed. Quite confusing ...<br>
<br>
I am trying on Win7 64bit.<br>
<br>
If the file wouldn't be so big I would try this task in The Gimp - where it is very simple to replace one pixel values with another - using "Select by color" and "fill with a specific color".<br>
<br>
Any idea how I could achieve my task with GDAL, QGIS, GRASS or Saga?<br>
<br>
Thanks,<br>
Andreas<br>
<br>
<br>
______________________________<u></u>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-user</a><br>
</blockquote></div><br></div></div></div>