Questions tagged [raster-calculator]
A tool in some GIS software programs for performing algebraic operations on rasters.
1,127
questions
0
votes
1
answer
10
views
Mean of NDVI rasters across time point in QGIS after removing bad quality pixels
I have several NDVI and EVI rasters from different time points across a study period. These are of a region in Burkina Faso, and during the rainy season pixel reliability can be low. I have first ...
0
votes
0
answers
10
views
Randomly faulty Northslopes with Raster Calculation in (Py)QGIS
So I am trying to calculate all Northslopes in the Area of the .tif files.
When I do it manually with the raster processing tool within QGIS it's only working sometimes, when I use the attached Python ...
3
votes
1
answer
50
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
24
views
QGIS Modeler variable input for Raster Calculator
I tried the following expression to call the variable number as input on QGIS raster calculator, but it doesn't like it. In other words, what is the syntax to be used to call the number? ((version ...
0
votes
0
answers
20
views
Convert Luojia1-01 DN values to radiance
I am trying to convert Luojia's DN values to radiance following the equation in the attached image.
I am using the Raster Calculator in ArcMap for this conversion and the command I am typing is image^...
1
vote
1
answer
33
views
Iterative computation over image collection and multiple indexing in GEE
I am having two image collections, sc, data(Sentinel 1 data).
I need to do an iterative type of computation where I need to use previous output for the next iteration and also multiple images using ...
0
votes
0
answers
13
views
Raster calculator double transformed output
I wanted to use the build in raster calculator of QGIS in order to get the NVDI of my RGBI raster (the reference layer is the same layer where I got the R and I band of):
After running the program ...
0
votes
1
answer
43
views
QGIS Apply Correction to Elevation Datum
I am wanting to apply a blanket correction to a bathymetry layer i.e. add 2m to every DEM cell. I assume I do this in the Raster Calculator but I'm unsure of the command line to use.
0
votes
2
answers
23
views
Calculate seasonal precipitation and temperature from CRU TS 4.05 in ArcGIS Pro
The Goal: To calculate the average spring (Mar-Apr-May) and summer (Jun-Jul-Aug) precipitation and temperature for a series of specific, discrete locations. These points represent sites (I'm an ...
0
votes
1
answer
29
views
How to limit the increase in the output raster size during a raster operation in Rasterio?
Context:
I'm subtracting two rasters and saving the result to my disk using Rasterio. I observed a significant increase (20x) in the size of the output file after the raster operation.
# Reading the ...
0
votes
0
answers
24
views
Raster summation missing cells when adding two rasters?
I am trying to add a 250m resolution raster to a 10m resolution raster. Using Raster Calculator in QGIS many cells that overlap are not summed. Does this tool require overlap of the 10m cells with the ...
1
vote
0
answers
27
views
How to use raster calculator to sum multiple bands' value of a raster layer in QGIS Graphical Modeler?
I have 12 bands in a raster layer which I would like to sum up to produce a single layer. Interestingly, the raster calculator tool does the job while running it (QGIS interface)[ but fails to do so ...
1
vote
0
answers
24
views
Raster Calculator with multiple rasters
I have 2 rasters in ArcGIS Pro
Raster 1: Values of 0-100 for percentage of tree cover
Raster 2: Values of 0-19 for tree cover loss by year (0 is no loss, 1 is loss in 2001, etc.)
I am trying to find ...
4
votes
1
answer
100
views
Raster calculator gives an output with mostly NoData values
I am using QGIS 3.20 and have an area with the whole extent covered by 4 different layers, but when I perform a raster calculation to sum up the cell values, I only get scattered results in a mostly ...
0
votes
0
answers
14
views
Raster Calculator output does not match polynomial equation using ArcGIS Pro
I am using ArcGIS Pro 2.7.2.
I'm trying to run a polynomial equation on a set of raster values using the following equation:
Con("Raster"<0,0,((744.183421501*("Raster")^3)-(869....
2
votes
1
answer
36
views
Using algorithm outputs with raster calculator in QGIS model designer
I am using the Raster calculator in a model builder workflow (QGIS 3.16), but get a very unspecific error when using algorithm outputs as input for the raster calculator:
An error occurred while ...
2
votes
0
answers
41
views
Error while using "wbt_conditional_evaluation" in R from WhiteboxTools package "whitebox"
When I try to perform the conditional tools "wbt_conditional_evaluation" in R, I get this message error :
Error running WhiteboxTools (conditional_evaluation)
whitebox.exe_path: "C:/R/...
2
votes
2
answers
109
views
Giving a unique integer ID to each value in raster calculator in QGIS
I'm trying to polygonize a raster layer which has decimal values. I have to assume polygonize rounds the decimal values up or down to the nearest integer since it appears to dissolves cells with ...
3
votes
1
answer
30
views
Raster Calculator in Model Designer doesn't take my input number into account
I'm trying to make this model work :
The formula in the Raster Calculator is like this : ('A'* @weightcesium )+('B' * @weightess1 ) + ( 'C' * @weightess2 )+ ( 'D' * @weightess3 )
However, the Raster ...
0
votes
4
answers
59
views
QGIS: raster change analysis
I have two rasters with values from 1 to 3 each. One is a current habitat suitability prediction and the other a future predicition. I want to visualize the changes. So which cell changed from 1 to 2, ...
3
votes
1
answer
157
views
QGIS 3.24.1: Raster Calculator returns error in Model Designer
I am trying to calculate a simple substraction between two rasters, after having reprojected one to be in the same CRS as the other. My model looks like this:
I get the following in the log:
QGIS ...
0
votes
0
answers
18
views
Patch the multibeam Z values where the single-beam data is NULL
I have 2 raster images - single-beam and multibeam. The aim of what I am trying to achieve is to patch the multibeam Z values where the single-beam data is NULL.
So far, in order to achieve this I ...
1
vote
1
answer
18
views
Sum two partially overlaping rasters in QGIS: auto-detect extent and resolution
I need to sum two rasters (r1 and r2) using QGIS. They're made of 0s and 1s (black/white), and overlap only slightly over a common border. In the overlapping area, r1 has data in part of it, and r2 ...
1
vote
0
answers
37
views
Qgs Raster Calculation [closed]
I am trying to make product of five raster layer, but not working.
if result:
lyr1 = QgsRasterLayer(self.dlg.comboBox.currentText())
lyr2 = QgsRasterLayer(self.dlg.comboBox_2....
1
vote
0
answers
27
views
Removing changed pixels in land use time series (MCD12Q1) using ArcGIS Pro
I have 20 rasters of my study area land use which is from MCD12Q1.
I want to remove the changed pixels in 20 years.
I tried to use ArcGIS Pro, but I could distinguish only two rasters with raster ...
0
votes
0
answers
27
views
What am I doing wrong in this simple Con formula in Raster Calculator?
I have a raster with cell values of 10, 13, 28, 31, 55, 79, 95, 97, 9060 and NODATA.
I want 95 to get the cell value 0.5, all the other numbers 0. And NODATA should be 1.
Below is my attempt:
...
0
votes
0
answers
24
views
Failing to correctly refer to raster layer in Raster calculator (ERROR 000539) using ArcGIS Pro
Here is my function in Raster Calculator:
Tan((Raster("MCE: TWI\Slope"))*1,570796/90)
MCE: TWI\Slope is the location for my Slope-layer.
Looks simple, but I keep getting the error 000539. It ...
0
votes
0
answers
42
views
Raster calculator expression
I'm looking for raster calculator expression which includes the "STATISTICS_MEAN" value from the raster properties.
How can I build the expression, that the value is automatically adapted?
I ...
0
votes
0
answers
28
views
Calculating change of slope angle within given slope interval using ArcGIS Pro
I need to find areas of rapid slope change greater than 10º within a slope interval of 28º < slope < 55º.
I created a slope layer from the DEM and then CON (spatial analysis) to isolate the ...
0
votes
1
answer
24
views
Clip Raster Data of risk area with boundary polygone of forest using ArcGIS Desktop
I'm new to the GIS world.
I need to find the areas that are at moderate (land cover = 1) and high risk (land cover = 2) of illegal logging in a forest. I already calculate the areas of high and ...
0
votes
0
answers
60
views
Calculating UHI using Raster Calculator in ArcMap 10.3
In ArcMap 10.3 I want to calculate urban heat island through the formula which is:
UHI= LST + (standard deviation (LST.NDVI and NBVI)/2)
I have the LST layer, NDVI and NDBI but I don't know how to ...
1
vote
1
answer
93
views
Land cover change detection using raster calculator in QGIS
I am trying to find the difference between land cover data from two years. I have used the same classification for both the raster files. For eg:
1-Agriculture
2-Forest
3-Urban
4-Water bodies
5-Barren ...
1
vote
0
answers
38
views
Should you resample rasters before or after raster calculator operations?
I struggle to understand if rasters should be resampled before or after doing some arithmetic. For example:
Suppose I have a DTM and DSM of an AOI which were produced from the same instrument, but the ...
0
votes
2
answers
106
views
Substracting one Raster from another ArcGIS Pro
I extracted the middle and high vegetation points from a lidar-point cloud and converted the points into two separate rasters (one for the high vegetation in dark green and one for the middle ...
1
vote
1
answer
70
views
Overlaying values of one raster over another
I have two rasters. One is larger and binary called mask (all values are either 0 or 1). The smaller raster fits inside this raster but has a much smaller extent smallerMask. All its values are 1. ...
0
votes
1
answer
23
views
How to define a raster in ArcGIS Pro for use in the Raster Calc. tool with Python script
As part of a lab for an intro GIS course, I'm trying to create a new elevation layer from an existing elevation raster, to create a raster layer that only displays where the elevation is above 224 ...
0
votes
0
answers
20
views
Using raster algebra
I'm trying to do a vegetation damage assessment for coffee farms using Lidar from Puerto Rico from before Hurricane Maria and afterwards. I created two DSM's for the pre and post rasters and then ...
5
votes
1
answer
90
views
Raster classes area calculation
I have 3 raster layers each of them is classified into 4 classes and each one has defined weight value. I had to to create FINAL raster by multiplying those 3 rasters with their weight values and ...
1
vote
1
answer
35
views
Giving constant inside greater than function or in raster calculator
threshold=arcpy.GetParameterAsText(2)
stream=GreaterThanEqual(facc_clip,threshold)
Error: Input Raster: Dataset 570416 does not exist or is not supported
Here 570416 is the value I input in the ...
1
vote
1
answer
61
views
Merging raster data with certain condition
I am doing a project and one demand is to create single raster by merging two rasters (Raster U and Raster R) into one (raster N) and only if conditions are met.
The picture below shows those ...
0
votes
1
answer
53
views
Raster calculator not performing sum
I have multiple rasters, which I reclassed to values from 0 to 10.
I weighted those rasters in "raster calculator" with my weight values and I obtained the correct values for each raster.
...
2
votes
1
answer
44
views
Raster calculator does not show right result ( only show true)
I am using ArcGIS 10.5. From a DEM, I have created a new raster showing slope using the slope tool. The colour scheme was automatically classified into 9 tiers. What I want to do is query this raster ...
1
vote
0
answers
24
views
"no data" result from raster calculator
Am trying to implement the following line in QGIS raster calculator:
("L@1" < 0) * ((1 - 16 * 200 / "L@1")^0.25) + ("L@1" >= 0) * 1
Basically, when L is less than ...
2
votes
0
answers
28
views
Cell grid not aligning in QGIS when raster calculator is used in model
I am attempting create my first model to automate some of my workflow. However, when using the raster calculator, the output raster is not aligned with the input one despite being referenced to the ...
1
vote
1
answer
80
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
...
1
vote
1
answer
33
views
Testing if two different rasters have overlapping data (not extents) before using raster calculator tool in ArcMap
I am writing a toolbox script that will generate a difference surface using the raster calculator in ArcMap by subtracting a raster of interest from many other existing rasters, then outputting the ...
1
vote
1
answer
96
views
QGIS Raster Calculator - keep orginal values instead of 1s and 0s?
I have a crop data raster layer in QGIS with one band with values from 10 to 230.
I have written an expression in the Raster Calculator to keep only a number of values (e.g. when = 145 OR when = to ...
2
votes
2
answers
54
views
QGIS Raster calculator calculates „-inf, inf“ instead of no-data
I am trying to extract Vegetation from an aerial image.
First I calculated a DEM for vegetation height and a binary image (0,1) for cover.
Then I divided DEM by binary. Result was a raster with ...
2
votes
0
answers
62
views
QGIS raster calculator syntax to turn `nodata` values to other values
In QGIS raster calculator, how is the syntax to refer to nodata values? Lets say I have a raster and want to generate a binary output raster with data -> 1 and nodata -> 0. There is an easy way ...
5
votes
3
answers
265
views
Comparing two rasters, based on a complex set of rules
I am trying to compare two rasters, say A.tif and B.tif. Both correspond to river bed level changes under two different flow conditions. Now I want to produce a comparison raster having values based ...