Questions tagged [raster-calculator]

A tool in some GIS software programs for performing algebraic operations on rasters.

Filter by
Sorted by
Tagged with
1 vote
1 answer
588 views

ArcGIS Raster Calculator Error 000539

I am getting the error-000539: Error running expression: rcexec(). I've seen that other people have this same issue but I am not sure how to fix mine. I just want to average the values of 10 rasters, ...
2 votes
2 answers
1k views

Detrending DEM (QGIS)

I’m trying to detrend a DEM in QGIS. The best guidance that I could find on the internet was this question : Removing elevation trend over sloped surfaces? I couldn’t understand that so I would like ...
1 vote
1 answer
38 views

Raster calculator for wind turbine output

Information about the amount of wind energy is available from the global wind atlas (Downloaded from https://globalwindatlas.info/ ) and is available to you as the raster layer Power-density_100m.tif....
1 vote
1 answer
332 views

Raster Calculator in processing scripts crashes using PyQGIS

I am currently writing a processing script for QGIS that goes as follows: Takes in a digital elevation model (DEM) tiff file, a shapefile mask of the study area, and a slope cutoff value in percent ...
0 votes
1 answer
285 views

Modeler with raster calculator using QGIS

I'm trying to use the modeler in QGIS to calculate the NDVI on a raster image. The model is the one below: In the "NDVI Calculator" algorithm I have set the parameters like this. The ...
0 votes
0 answers
24 views

Raster calculator: could not create destination file

I am trying to create a curve number distribution using a raster calculator using the code shown in 1. However, I was getting the error shown in 2. I am using QGIS 3.28.15 version to do the process.
3 votes
3 answers
658 views

Converting floating point raster to vector

I'm trying to convert a raster layer to vector but I'm really struggling. First it says that I have floating points rather than integers so I have I have seen you can use raster calculator to multiply ...
4 votes
1 answer
329 views

Which output data type to choose in QGIS SAGA Raster Calculator in Batch Mode?

I have 5 years of MODIS13Q1 NDVI .tiff images for time series analysis. I want to multiply all the images with the scale factor of 0.0001 before using them. In order to process all at once I try to ...
0 votes
0 answers
15 views

Large values while calculating on normalized difference indexes

I've encountered a problem while calculating NDDI index (NDVI-NDWI/NDVI+NDWI) in ArcGIS Pro for my bachelor's thesis. I'm working with Raster Calculator (the problem appeared in both Image Analyst ...
1 vote
1 answer
296 views

Error 000539 in ArcGIS Desktop?

I am using Raster Calculator in ArcGIS 10.4.1 in order to substract two raster surfaces. However, when I substracted the two surfaces an error 000539 was appeared! I tried to adjust the two surfaces ...
0 votes
1 answer
172 views

gdal_calc to replace null values of one raster with values of another not working

I have a raster containing NULL values in which I'd like filled To do so, I have interpolated the raster via IDW in GDAL, and then used the QGIS raster calculator to perform the following calculation ...
0 votes
0 answers
21 views

Raster calculator for RUSLE (six factors)

I am using ArcGIS Desktop 10.8. I have tried many time to estimate soil loss by RUSEL, using R, K, LS, C and P factors. However raster calculator failed. The message suggest was here: Error 000539 2)...
1 vote
3 answers
14k views

Changing pixel values using QGIS raster calculator?

How could I convert values of 32767 to 0 using raster calculator in QGIS?
4 votes
1 answer
302 views

Qgis3 APIbreak : QgsFeedback instead QProgressDialog while using QgsRasterCalculator

I upgraded my Qgis to 3.0.1 and I try to upgrade some of the plugins I wrote. I have a plugin which uses GDAL/rastercalculator from several raster layers to get new information. With Qgis2 api it was ...
1 vote
0 answers
31 views

QGIS raster calculator using Python console

I want to calculate sum values of many rasters (from input folder) in QGIS Python using raster calculator. When I run script, QGIS crashes: Windows fatal exception: access violation import os from ...
5 votes
2 answers
604 views

QGIS: overwrite part of a raster by another raster

I am trying to create a single raster file that divides the region of Antwerp, Belgium into 5 categories: high green, low green, agriculture, water, and build-up area. For this, I will have to combine ...
3 votes
0 answers
31 views

Causes for different results of same raster calculation in Manifold 9 vs QGIS 3.22.12?

I have an RGB orthophoto from which I want to calculate the KANA index (normalised difference of R and B). I have tried out the same calculation in Manifold and in QGIS, and it results in slightly ...
0 votes
1 answer
195 views

Creating land use layers

I have a land use layer which includes 36 different individual classes. Using the raster calculator I have been able to extract 1 of the different classes and make a new layer (landuse=[number of the ...
2 votes
1 answer
261 views

"TypeError: index 0 has type 'QgsRasterLayer' but 'QgsRasterCalculatorEntry' is expected." error when calculating NDVI Landsat 5 with PyQGIS

I start to write my own simple code to automatically calculate NDVI from Landsat 5. Here is my code: from PyQt5.QtGui import * from qgis.analysis import * land_3 = 'D:\park\...
0 votes
2 answers
103 views

Error while using Raster Calculator to calculate NDVI in QGIS

I exported 2 raster bands of Sentinel II (band 4 and band 8) to calculate NDVI (B8-B4)/(B8+B4), these 2 rasters are in EPSG:32630 - WGS 84 / UTM zone 30N. I'm currently using QGIS 3.26.1. When I try ...
1 vote
2 answers
360 views

QGIS Raster Calculator tool does not have a Save to Temporary File option

At 3.18.3, the Raster Calculator tool does not have a Save to Temporary File option. Clicking the Output layer ellipsis only allows saving to disk. Is there an optional way to save to a temporary ...
3 votes
2 answers
180 views

Creating a new raster showing values based on how many rasters overlap

Intro to GIS student here. Hopefully I can articulate this issue clearly: Currently, I have six raster layers that I am trying to create a new layer out of. I think the best way to describe the new ...
0 votes
1 answer
58 views

Using nested conditional statements in QGIS Raster Calculator

I'm currently working on a project in QGIS and have encountered an issue with formulating a nested conditional statement in the Raster Calculator. How do I resolve this? My goal is to perform a raster ...
3 votes
1 answer
539 views

Calculating NDVI using QGIS Python Console

I'm going to calculate NDVI using band 4 and band 3 of Landsat 5. The code I wrote: import os, re import processing from osgeo import gdal input_B4 = r'C:\Users\test\...
0 votes
1 answer
279 views

Union three rasters using raster calculator of ArcGIS Pro

I want to combine 3 rasters (land use, water bodies and airports) into on raster with only two values 0 and 1 where the places of land use, wetlands and airports are = 0, otherwise = 1 I used raster ...
0 votes
1 answer
387 views

Calculating Population-Weighted Exposure level using QGIS

I am trying to calculate population-weighted exposure level (PWEL) of particulate matter. I have raster layer of both particulate matter and population. The equation to calculate PWEL is: Pi is ...
3 votes
1 answer
45 views

Calculation using exp() function in raster calculator of QGIS fails

I have been trying to use this expression in the QGIS raster calculator: 1 / (1 + exp(-(β0 + β1 * RasterX1 + β2 * RasterX2 + ... + βn * RasterXn))) The above expression has been replaced with the ...
4 votes
2 answers
138 views

QGIS graphical modeler and raster calculator

I'm making a graphical modeler that creates me a kind of DSM, like that: I create a DEM for my extent (I have the DEM for my whole country). I have the Lidar for the height of the forest and I ...
1 vote
1 answer
172 views

Calculate the mean of files generated from gdal.Translate

I created several velocity maps from .nc files through gdal.Translate. Each .nc file is organized in several bands, I am only interested in 1: velocities. gdal.Translate allows me to select only the ...
2 votes
2 answers
3k views

ENVI band math incorrect values

I'm attempting to calculate vegetation indices in ENVI 5.2 using level-2 AVIRIS data in band math. The indices I'm working with are Vogelmann Red Edge 2, normalized difference red edge, and red edge ...
0 votes
1 answer
1k views

Using Raster Calculator Con(isnull) with ArcMap

I am using ArcMap 10.4.1 and the Raster Calculator to subtract polygons of clouds, land etc from my DEM. I use the statement: con(isnull, Cloud, DEM) and set the processing extent to environments of ...
0 votes
1 answer
173 views

Using Raster calculator gives ERROR 000539

I'm new with ArcGIS. I would like to do a calculate of NDWI. So I'm using Arctoolbox => Spatial analyst tools => Map Algebra => Raster calculator. But when I'm trying to perform it, I get this error :...
0 votes
0 answers
32 views

Filtering data on QGIS

I have a raster displaying anchoring intensity in the Mediterranean Sea. As you can see in the first screenshot, there are two different classes (pink and dark pink). I would like to get rid of the ...
1 vote
2 answers
259 views

Terracing and data format issues when converting DEM from float32 to UInt16

I have spent quite a bit of time trying to figure this issue out; I was hoping someone on here could give some advice on what to do. I am having issues with terracing on my 3D model in Blender and I ...
2 votes
0 answers
40 views

Raster Calculator returns strange values

I am using the raster calculator on QGIS to calculate a spectral index from a raster. The formula is the following (it says it's valid): ( "CASI_Noon_III@50" - "CASI_Noon_III@43" ) ...
1 vote
1 answer
2k views

Calculate percentile value of raster

I want to set null all raster values that fall below the 75th percentile value. E.g. If you classify the raster by quantile method into 4 classes I want to be left with the top 25% percentile. For the ...
6 votes
1 answer
991 views

Dealing with no-data values in raster calculator of QGIS

I am trying to patch two rasters with raster calculator but I am not finding the way to work with no-data values. Lager@1 has some information I need as first option, this has as no-data -9999 (...
1 vote
2 answers
2k views

TypeError: unsupported operand type(s) for -: 'str' and 'int'

I have 732 temperature rasters (366 min and 366 max temp) that I want to manipulate depending on if the max temperature was greater than a specified and constant crop category temperature. import ...
0 votes
0 answers
24 views

Sum rasters without clipping

I'm using Raster Calculator in ArcMap. Is there a way to make operations between rasters in a way that the output raster is not clipped with the same extent of the smaller raster considered in the ...
1 vote
1 answer
1k views

Specify field of raster in Raster Calculator expression of ArcMap

In Raster Calculator I need to apply the next expression: Con("raster1%","field3")==Integer, Lookup("%raster2%","field3"),Lookup("raster1%","...
1 vote
1 answer
394 views

Shoreline change analysis in ArcGIS Pro

I am trying to determine the change/reduction of shorelines using Sentinel 2 data using ArcGIS Pro 2.8. However, I don't have a lot of experience in raster analysis and I'm a bit at a loss... how ...
0 votes
0 answers
43 views

Create a raster which has a value of 1 for where a class of object is present and a value of 0 when it is not in ArcGIS

I have probably explained this very badly, but basically I have polygons which outline the extent of individual fish farms in a lake. I have created a 1km by 1km fishnet of the area within said lake, ...
0 votes
0 answers
49 views

Why is OK greyed out in my Raster calculator?

I cannot figure out why I cannot click OK on my Raster Calculator. It might be important to note I am on MACBOOK PRO.
1 vote
1 answer
94 views

Combining two different rasters with different extent and different precision in QGIS

I am trying to combine two rasters into one, so that I can better work on it as one topography layer. I need both, because the first (1) one has complete information on my focus area, while the second ...
4 votes
1 answer
1k views

How to add rasters of different sizes with Arcmap or Qgis raster calculators?

I've got 8 rasters all of different sizes. What is the proper syntax, for the raster calculators of either ArcMAP or QGIS, that will output a raster that covers the extent of all my data not just the ...
6 votes
2 answers
3k views

How to calculate a new raster based on nodata values from original raster, in QGIS?

I'm using the raster calculator from core in QGIS and I need to generate a new tif raster file (mask) from the nodata values of another tif raster file. I tried isnull(), but no luck. Any one can help?...
1 vote
1 answer
62 views

Band calculations using satellite images captured on different dates

I want to do some band calculations using bands taken from multi spectral (MS) satellite images and bands from a short-wave infrared (SWIR) image. I have one SWIR image covering the whole area of ...
0 votes
1 answer
395 views

How to write it on ArcGIS Raster Calculator?

I just started using the Raster Calculator, so I don't know how to build the formulas. How can I do this? I need to write both of these formulas: D = is a raster file called "Slope_2" P = 13
3 votes
1 answer
109 views

Separation of DSM as Building DSM and Canopy Height Model in QGIS

I am currently trying to separate the DSM as Building DSM and Canopy Height Model. I also have DTM, Building Footprint data. Digital Surface Model Building Footprints. For separation I converted the ...
0 votes
0 answers
48 views

Raster calculator error 000867

So I am trying to convert DEM values from meters to feet using Raster Calculator. But I keep on getting error 000867 contains invalid cell size or dataset.. I tried exporting the input raster as a tif ...

1
2 3 4 5
25