2

I am using QGIS 3 on a Mac. I have a large raster (bfd.tif size is 26000, 31800) that I'm trying to apply a calculation to. When I use the default raster calculator in QGIS 3 I get a raster back with every pixel the same value. When I try to use the Geoprocessing r.mapcalc I get "env python3 no such file or directory".

I'm following this tutorial Creating Shaded Relief in Blender so in order to have a height map that works with Blender each pixel value needs to be an integer. I'm using this formula to stretch the values evenly from my min -2.06 to my max 1615.48.

raster_out=( bfd + 2.06 ) / ( 1615.48 + 2.06 ) * 65535

There is a question here that looks like an alternative but I'm not sure how to run this code or how to manipulate it for my purpose. QGIS Raster Calculator Not Giving Output Where can I learn about this method?

And fixing environment variables for QGIS 3 and Python might help me but this question has no answers. QGIS 3 env Python 3

  • 3
    Do you have SAGA 2.3.2 (GUI version) in QGIS folder? It's Grid Calculator can handle large file, and you can assign Data Type (such as unsigned 1/2/4 byte integer simultaneously. – Kazuhito Jun 2 '18 at 2:22
  • I don't have SAGA. I'm looking into installing it now – jfact0ry Jun 2 '18 at 2:54
  • Then you might be on Mac OS, sorry I do not know if SAGA GUI works on it. – Kazuhito Jun 2 '18 at 3:11
  • 1
    qgis saga integration works fine on Mac OS, but I'd recommend at least QGIS 3.0.1 if using KyngChaos build. I have saga_gui working but this seems to be via homebrew (saga-gis-lts) – Steven Kay Jun 2 '18 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.