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
1answer
24 views

Flow Direction tool outputs strange raster that doesn't work with subsequent hydrology tools

My main goal here is to end up with a shapefile that simply defines the ridgeline in a given area. I followed the directions at How To: Identify ridgelines from a DEM and am having some trouble. ...
2
votes
1answer
44 views

Creating NDVI from raster using ArcPy

I have to create NDVI's for multiple raster images, and so want to find out the most efficient way to do it. The code below works, but I wondered if there was a more efficient way to do it? # ...
0
votes
1answer
25 views

Failing to use the correct Con expression in raster calculator in ArcMap

So, I am trying to use the Con statement in ArcMap to add a certain value to a raster dataset (raster2) if the data is the same as an other dataset (raster1), if not I should just stay the same. I ...
1
vote
0answers
16 views

How to keep remain void islands in raster while mosaic?

I have raster images of DEM files After running Mosaic To New Raster, I am getting images were all void spaces are getting filled(Highlighted with red lines in above image) Below is the setting I ...
2
votes
1answer
69 views

Raster Calculator in Arcpy Script Tool

I am working on a script tool that will be run from a custom toolbox in ArcCatalog. I have written everything with the inputs hardcoded into it for testing. Works great running from IDLE. I had ...
3
votes
0answers
106 views

Rasterize/Filter with Burn and Weight variables in QGIS

Using QGIS 3.10.1, I am attempting to rasterize some demographic polygons, and then apply a filter (Gaussian) to create a smooth/graduated surface. This works fine for some of my values (e.g. total ...
0
votes
0answers
33 views

Using Raster Calculator in ArcPy gives ERROR 000989

I am creating a watermask from the DEM in ArcGIS DEsktop 10.5 python script. After executing the tasks, at the end I am getting the MIN elevation from Statistics_analysis. Now I am doing ...
0
votes
0answers
44 views

How to find the brightest pixel?

How can I find the brightest (with the highest value) pixel of a raster in QGIS using the calculator of raster or python console?
5
votes
1answer
159 views

Conditional calculation using raster calculator in QGIS

I have two rasters with the same extent, resolution, and projection, let's say raster A & B. What I want to do is something like this: IF A = 3 OR A = 11 THEN A+B ELSE B How can I do such a ...
1
vote
1answer
27 views

Raster calculator - problem with number variables in ModelBuilder

When I 'm calculating this expression: ("%Soil organic carbon (t/ha)%" / (10000 * "%Soil depth (m)%" * (Float("%Bulk density (kg/m3)%") / 1000))) * 100 Where: "%Soil organic carbon (t/ha)%" and "%...
0
votes
0answers
30 views

PyQGIS raster calculator add raster maximum and minimum value in script loop

Referring to this post I want to add the maximum and minimum raster value in the script loop to do a normalization calculation. The normalization calculation I want to do: (((Rasterlayer - Minimum ...
2
votes
0answers
34 views

Calculating indices by Multiple polygons

Is there a way in QGIS to perform band math within each area defined by different polygons without clipping the rasters and performing calculations on each one? I have a vector layer with several ...
2
votes
1answer
72 views

ArcGIS Raster Calculator Erase raster from raster

Two rasters slope (black and white grid with slope values) rasterized property (red, values do not matter) I want to erase the red raster from the slope raster I found this thread https://...
1
vote
1answer
33 views

QGIS Raster calculation fails in Graphical Modeler

I'm trying to use the graphical modeller to automate a certain process (extracting North-South facing slopes from a DEM). The process is as follows: Calculate Slope Calculate Aspect Extract North-...
0
votes
1answer
33 views

MCARI vegetation index in ArcGIS raster calculator

I'm trying to write the equation for the MCARI vegetation index in raster calculator using WorldView-2 imagery, but can't get it right. Here is the original formula: MCARI = [(RedEdge – Red) – 0.2 × ...
1
vote
0answers
44 views

QGIS Python Standalone Script using qgis.rastercalculator

I have been attempting to use the raster calculator algorithm in a standalone python script and have been trouble getting it to work. My issue is with the expression. precip = QgsRasterLayer( ...
2
votes
1answer
38 views

Creating flood inundation map from watermark QGIS

I have a high water elevation for a location and I want to subtract this elevation by the DEM raster to achieve a water depth raster, and I am not sure how to go about this. I am assuming a constant ...
0
votes
0answers
69 views

Enhanced Vegetation Index( EVI) Value Interpretation

Im working on calculation of Calculation of Enhanced Vegetation Index(EVI) From Landsat 5 TM and Landsat 8 OLI Using ArcMap 10.4.1. As far i know to Calculate EVI, first it needs to Convert the DN ...
2
votes
1answer
29 views

Focal statistics using GRASS GIS r.mapcalc

I have a workflow in ArcGIS that I'm trying to convert to GRASS GIS. Part of this workflow involves using Raster Calculator to execute a conditional statement. If the conditional statement is true, a ...
3
votes
1answer
103 views

Sum the values of all rasters in a user defined list

I am creating a QGIS plugin a part of which is like the SAGA Rasters sum tool. The user interface will have a widget to which the user will load the raster layers. I am trying to get the pixel-wise ...
1
vote
1answer
59 views

Reclasifing raster with raster calculator

I am using QGIS 3.8 and I have a raster named "Ri" with one band with values ranging from 0.00299858 to 0.198849 and second raster named "IP_Q" with one band with values ranging from 0.00100708 to 14....
1
vote
0answers
47 views

Merging three different rasters

I am using QGIS 3.8 and I am trying to merge three rasters according to the scheme pictured on the attached screenshot. I tried many syntax expressions for the Raster calculator but I was unable to ...
1
vote
0answers
24 views

How do I use QGIS to merge maximum values of multiple TIF files into one "maximum value' raster?

I have 14 rasters that represent water storage for the same area over a range of years, 2002 to 2015. I am looking for a way to find the maximum value at each pixel location. I am not looking for the ...
4
votes
1answer
67 views

exp function not recognized in Raster Calculator?

I am trying to preform a calculation for the exponential increase in cost of a slope, using the "exp" function, but get an "error parsing formula" message. The expression as I've written it is: 1000*(...
1
vote
0answers
50 views

Using decimals in QGIS raster calculator

I am using the QGIS raster calculator to change the values of pixels of a specified value to a different value. For instance, to change all pixels with a value of -32768 to a value of -999, I can use ...
2
votes
1answer
89 views

gdal_calc raster calculcator : “any” syntax

I'm trying to combine 2 raster layers using gdal_calc in order to use them in QGIS 3.8. One of the condition that has to be met could be translated as "if the value of raster A is 1 and the value of ...
1
vote
1answer
53 views

Raster calculator giving error 000539

I'm trying to do Subtraction between two rasters. and I'm getting this error 000539 : Error message from Python. Description The calculation used by the Calculate Field or Calculate Value tool is ...
0
votes
1answer
48 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 :...
1
vote
0answers
44 views

Average width of a a zone [duplicate]

How can I get the average width of a region or inside a curve? or How can I calculate minimum,maximum, and average width of an irregular polygon? I have attached a figure, I want to know how can I ...
1
vote
0answers
48 views

Operation between raster using QGIS

I create two raster using QGIS Interpolation tools starting from two vector (Point): one with an accessibility index( between 1 and 5) for each point and one with population (number of people) for ...
2
votes
0answers
30 views

Raster Calculator for PyQgis

I'm trying to process two raster on the Raster Calculator of PyQgis and I wrote a script, but QGis 3.2 crashes everytime I run the script. import processing import os import time from qgis.analysis ...
3
votes
1answer
198 views

Calculate statistics for rasters with multiple bands (600) in QGIS

I am a new user of raster layers in QGIS. I need to generate a new raster file with the average value for each pixel, from a raster file with 600 bands. The average has to be calculated from all the ...
1
vote
1answer
19 views

Errors when filling/replacing NoData values with Raster Calculator FocalStatistics

I have the following raster, which has many NoData values. Only the NoData values that are in the ocean need to be filled. I made a seperate raster with all the NoData cells that are in the ocean. I ...
1
vote
1answer
52 views

Combining two aligned overlapping rasters in raster calculator

I have two rasters with the same extent, projected coordinate system, cell size and they are aligned. "raster1" has continuous values ranging from 0 to 6.09 "raster2" has continuous values from 0 to ...
1
vote
0answers
44 views

Getting inconsistent raster output from gdal_calc.py raster calculation

I'm attempting to do what is generally a straightforward raster calculation when I do this in QGIS, but am trying to do this with gdal_calc.py in terminal. The output is close, but produces banding ...
1
vote
1answer
46 views

Change detection between two binary images

Is there a scientifically-valid to use raster calculator to subtract two binary images (0, 1) to get the difference between Pre- and Post flood events? In pseudo-code: Difference "change detection" ...
0
votes
1answer
48 views

Using raster calculator with GDAL in Python to make sum?

I have 130 rasters in a folder and I would like to create a new raster containing the sum of the 130 raster cell values. How can I do this?
1
vote
1answer
116 views

Using raster calculator with GDAL in python?

i am using an hyperspectral image with 158 bands. I want to calculate raster. i am using the following python script import gdal # Import GDAL library bindings from osgeo.gdalnumeric import * from ...
2
votes
1answer
120 views

How to use maximum and minimum operator in raster calculator QGIS

I would like to normalize a raster, using the raster calculator in QGIS 3.x but I don't know how to use the maximum and minimum operator. I have tried the following sequence but it does not recognize ...
1
vote
0answers
37 views

Multiplying two iterating rasters in ModelBuilder or Python?

I have several Landsat scenes that I wish to remove clouds from. I can do this by multiplying the Landsat layers by their associated cloud layers in the Raster Calculator. How can I set up iterations ...
4
votes
1answer
77 views

Merging three rasters into one

I need to merge 3 rasters into one, each raster is single banded and ranges from 0 to 1. The rasters overlap at some places. Below is how each raster looks like and how the output should look like ...
0
votes
1answer
40 views

ArcGIS Conditional operation in Raster Calculator

I have two raster datasets called "Raster1" and "Raster2". Raster1 is slightly larger than Raster2 in extent (in Top, Left, Right and Bottom). This means Raster2 is fully contained by Raster1. I ...
1
vote
0answers
48 views

Problems with Zonal Statistic in graphical modeler QGIS 3

I want to make an average of two rasters previously generated in a model but it always gives error. I have used both SAGA and GDAL to calculate the raster out of graphical modeler without problems, ...
1
vote
1answer
107 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 ...
0
votes
1answer
64 views

Looping through two raster folders to perform raster calculation gives ERROR 999998?

Last week I asked Looping through two raster folders to perform raster calculation? about a script to loop through two geodatabases and perform a raster calculation by matching the two rasters up ...
1
vote
1answer
38 views

Looping through two raster folders to perform raster calculation gives ERROR 000732?

Last week I asked Looping through two raster folders to perform raster calculation? about a script to loop through two geodatabases and perform a raster calculation by matching the two rasters up ...
1
vote
1answer
54 views

Looping through two raster folders to perform raster calculation?

I have two geodatabases with rasters containing information about "treecover" and "loss". The file names are slightly different but can be matched based on the last 8 characters (the coordinates of ...
2
votes
1answer
29 views

Strange output while calculating raster in QGIS

I've encountered the following problem frequently when I am using the raster calculator, even though sometimes the calculator works. However, I cannot figure out the difference between the times it ...
3
votes
1answer
58 views

Multiple conditional statements for raster calculation in R

In the context of a RUSLE erosion modelling I would like to calculate the sum of precipitation at the entry date of phenological phases. Suppose I have 13 grids, one of which is the phenophase entry ...
0
votes
0answers
24 views

Calculating total cost along multiple polylines using ArcGIS Desktop?

I'm looking to create a new sewer line. Part of the process includes making a cost analysis, which mainly centers along elevation. Areas that are lower than the treatment area need to be pumped, areas ...