Tuesday, 19 September 2017

Inverting values of raster file using QGIS?


I ran a proximity (raster distance) function and I would like to invert the result.


Is there a simple way to do this with out converting it back to vector format and editing the attribute table?



Answer



Thanks to Mr. Stimson I used the expression 1000-(raster layer) to get the inverted raster result. I chose 1000 because it didn't have to be an exact invert and I didn't want negative numbers. I need to run it through r.cost algorithm which creates an error if there is a negative number. enter image description here


If you are wondering what number to use try this link How to extract pixel value counts from a raster in QGIS?


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...