[Qgis-user] Raster: replace a single value with another value

Andreas Neumann a.neumann at carto.net
Tue Nov 18 03:15:55 PST 2014


Hi Michael,

Thank you for your reply.

I tried now in Saga directly, where the UI seems to be easier than in 
QGIS processing. When I start it, I get a "Module caused access 
violation" after about 10 seconds.

Here are the settings I used: 
http://webgis.uster.ch/temp/saga_reclass_settings.png

Maybe the image is too big? Width and height are each > 70000 pixels.

Are there any size limitations? Or settings to improve memory usage?

Thanks,
Andreas

Am 2014-11-17 18:19, schrieb Michael Treglia:
> Hi Andreas,
> 
> Strange that you're having this error - for simple reclassifications,
> SAGA is typically what I use (I agree it seems complicated and tough
> to understand)
> 
> Not sure if it will be useful for you, but I've got an example in a
> tutorial I produced here (as a PDF - the raster reclassify starts on
> page 30).
> http://mltconsecol.github.io/QGIS-Tutorial/QGIS-Tutorial/Treglia_OSOS%20Notes_V1.01.pdf
> [2], though the example is for a "Simple Table", to reclassify a bunch
> of values.
> 
> For your problem, I would just chose the method "Single", setting your
> old value and new values appropriately, and make sure to uncheck the
> box to "replace other values". 
> 
> Are you exporting to a file? Or to a temp file?
> 
> Also, this is do-able in R; if you want to give that a shot, write
> back and I'll send some instructions [need to re-look up my method for
> that... its been a little while].
> 
> Hope that helps,
> Mike
> 
> On Mon, Nov 17, 2014 at 11:02 AM, Andreas Neumann
> <a.neumann at carto.net> wrote:
> 
>> Hi,
>> 
>> I have a very simple task (at least I thought it is simple), but am
>> not able to do it properly.
>> 
>> 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.
>> 
>> I tried with gdal "nearblack", but nothing changed - I started a
>> separate email-thread about that at the gdal list.
>> 
>> Then I tried with the QGIS raster calculator - but it does not
>> support conditional syntax.
>> 
>> I tried with Processing and GRASS - but it would stop at 8% - the
>> file is quite big.
>> 
>> 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 ...
>> 
>> I am trying on Win7 64bit.
>> 
>> 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".
>> 
>> Any idea how I could achieve my task with GDAL, QGIS, GRASS or
>> Saga?
>> 
>> Thanks,
>> Andreas
>> 
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user [1]
> 
> 
> 
> Links:
> ------
> [1] http://lists.osgeo.org/mailman/listinfo/qgis-user
> [2]
> http://mltconsecol.github.io/QGIS-Tutorial/QGIS-Tutorial/Treglia_OSOS%20Notes_V1.01.pdf



More information about the Qgis-user mailing list