Questions tagged [raster-calculator]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
24 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 ...
0
votes
0answers
6 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
38 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
37 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
40 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" ...
-1
votes
0answers
20 views

Raster package in R - “Error in filename != ”“ : comparison (2) is possible only for atomic and list types”

I get the above error when using calc to retrieve values from two rasters (propSummPCP, propWintPCP) in the raster package of R. It works for a single raster (either one). Looking to return NA, in ...
0
votes
1answer
25 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
33 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
46 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
32 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
69 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
36 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
34 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
49 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
58 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
37 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
45 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
27 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
38 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
23 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 ...
1
vote
1answer
33 views

ArcPy: Create NDVI with Raster Calculation and Map Algebra

My target is to create NDVI Rasters but I'm stuck with python loops, since I'm new to that, so sorry for a maybe basic question. I have 2 folders, one with rasters (tif) with the red band, the other ...
0
votes
0answers
28 views

Creating raster from grid algebra expression using point attribute values?

I have a point shapefile representing groundwater production wells with annual pumpage values distributed over a general area. I'd like to create a raster layer with each cell representing the ...
1
vote
0answers
17 views

Raster Calculator in the Graphical Modeler of QGIS 2.18

How to convert this expression from raster calculator ("noise_heatmap_clip@1" <= 50) * 5 + ("noise_heatmap_clip@1" > 50 AND "noise_heatmap_clip@1" <= 100) * 4 + ("noise_heatmap_clip@1" > ...
0
votes
1answer
32 views

Find intersecting cell values for multiple rasters

I am trying to find where 2 raster cells values intersect. I have a ground DEM raster and a water elevation raster. I need to find where are values meeting and export the cells. In the graphic below,...
1
vote
1answer
34 views

Using Multiple Raster Intermediate Inputs in Raster Calculator within QGIS Process Modeler

I am stringing together a series of raster calculations in the QGIS process modeler in order to calculate a surface temperature dataset from Landsat and weather data. When I use the output from ...
0
votes
1answer
24 views

Expanding raster with many zone values using ArcMap?

I am using ArcMap 10.6.1 and I need to expand a large raster with tens of thousands of zones by 1 cell using either the expand tool or a map algebra expression. The tool asks to specify each zone to ...
0
votes
0answers
30 views

Changing NODATA value GeoTIFF with ArcPy of ArcGIS Pro?

I'm using a tool in ArcPy for Python 3 (ArcGIS Pro) which applies an operation to a raster file in GeoTIFF format. condicion = '("{}" - {}) / {}'.format(input_image,n,m) arcpy.gp.RasterCalculator_sa(...
1
vote
1answer
68 views

Raster calculator - problems with syntax

I have a raster layer with values ranging from 0.00597303 to 0.102894 and I want to assign specific number representing a group to specific range of values: Group 4: x >= 0.1 Group 3: 0.01 <= x ...
1
vote
0answers
37 views

Getting ERROR 000539 running Raster Calculator in ModelBuilder?

I am trying to run Raster Calculator in ModelBuilder, however I am getting what looks like two errors after my model reaches a certain step: ERROR 000539: Error running I'm not sure if it is a ...
1
vote
0answers
44 views

Raster statistic

i'm try to use QGIS processing modeler but I've a problem. I need to use the Mean value and the standard deviation in raster calculator algorithm. I've calculated it in raster statistics, how can I do ...
1
vote
0answers
41 views

Calculating NDVI values for specific zones using zonal statistics using QGIS

I am currently working with multispectral data from a MicaSense RedEdge M on a plot size study in wheat research plots. I want to conduct zonal statistics to calculate NDVI for individual plots. I ...
1
vote
1answer
83 views

Raster calculator issue in QGIS 3.8 and 3.8.1

I am trying to perform a simple raster calculation on an elevation layer to occlude certain values. I have used the following expression: ( ( "clipped_elev@1">500) AND ("clipped_elev@1"<1000))*"...
0
votes
0answers
12 views

Rescaling NDVI from 0-255 to -1-1 in ArcGIS Pro?

My NDVI raster ranges from 0-255. My goal is to get values from -1 to 1. If using the Raster Calculator, what would be the correct equation to achieve this? I'm working in ArcGIS Pro.
0
votes
1answer
17 views

Give non-overlapping parts of 2 rasters a value 0 (QGIS)

Is there a way in QGIS to give non-overlapping parts of 2 rasters a value of 0 in the new raster file? I would like the data gaps in the velocity file (so where Ice mask is displayed on the chart) ...
1
vote
1answer
33 views

Tweak raster calculation

I’m creating layers with qgis 3.4 raster calculator. How can I go back and modify the calcs or do I have to start over every time?
0
votes
1answer
34 views

Finding overlap and sum of rasters using ArcGIS ModelBuilder?

I have about 300 rasters that I need to find the overlap and sum of to find 'hotspots'. I set each raster value to 1 and used the Mosaic to New Raster tool to create a new raster. I tested this with ...
1
vote
0answers
33 views

All 0s result from raster calculator in python

Raster calculator is not working correctly for a single calculation using a standalone Python script. I am trying to add 1 to a pre-existing raster. It processes, but the resulting tiff file is all 0s....
0
votes
1answer
32 views

ArcMap Raster Calculator SetNull not changing value?

I am having issues with the "SetNull" function within the Raster Calculator in ArcMap. I have a landsat 8 image that I separated the bands into their own raster (only working with 6 of them), bands 2-...
1
vote
0answers
23 views

Join DEM and GPS data point ArcMap

I have a problem using ArcGIS. I have generate a DEM raster with a 3D online software and exported it in ArcGIS. So I have a raster of my surface. After that, I have some GPS point (x,y,z) that we ...
1
vote
1answer
46 views

Setting RGB TIFF “zero” values to “NoData”

I am having a problem with getting my Landsat 8 RGB (bands 2-7) .tif background values (very small number but not zero) set to null. I have tried the following tools: Raster Calculator (image 2) ...
1
vote
0answers
17 views

Calculating the distance of raster cells from a vector within a polygon using QGIS

I am quite new to QGIS and am trying to use QGIS 3.6 to create a raster layer of calculated values of the minimum distance of each cells within a polygon (orange) from a vector (the river channel in ...
4
votes
1answer
103 views

Using variable in graphical modeler for raster calculation? (QGIS 3.8)

I am trying to create a flow in the graphical modeler using a variable in a raster calculation. Is there a way to use a variable directly in the raster calculator (SAGA or GDAL)? I know there was a ...
0
votes
2answers
25 views

Getting error 000539 when calculating TWI?

I'm trying to calculate the twi from my area using LN((flowaccu+1)*900/Tan(sloperadian). My first result was wrong because my area is an endhoreic basin. So I made a flow accumulation raster based on ...
1
vote
0answers
30 views

Raster calculator giving different results in ArcPy than in ArcGIS?

I have two rasters representing travelling speed: one for road (with speed values for different types of roads and "0" values where there is no roads) and one for land-cover (with lower values, but no ...
0
votes
0answers
16 views

Raster calculator and Zonal Statistics as a table do not work on joint combined raster?

I combined 3 raster files in ArcMap 10.4 and then joined 3 .dbf table to the combined raster and exported the result to a new .tif file. Now I am trying to run "Raster calculator" and "Zonal ...
0
votes
0answers
19 views

Inverse values in raster heightmap

I have just converted a point vector into a tif using Rasterize in QGIS. And values are currently: How do I completely flip the values as it should be Min -98.95 and Max 2.3 I can't find much when ...
2
votes
1answer
36 views

Using ArcGIS ModelBuilder iterator to for Raster Calculator?

I have a raster that I need to divide by X in a model. I have hundreds of values I need to divide it by. What I am trying to do is create a list of values, and use the iterator to loop through them ...
0
votes
1answer
42 views

Raster Calculator giving inccorect results with large numbers

I am attempting to multiply my raster values by 10000 using the raster calculator in QGIS 3.6.2. But am getting weird results. For example I have an initial raster value of 30303 and would expect a ...
1
vote
0answers
25 views

Reprojected raster return only zeros from QGIS raster calculator

I am experiencing an issue when trying to use my reprojected raster in QGIS raster calculator; First, my raster is reprojected from degrees to meters. After that, I want to process the layer by ...
0
votes
0answers
37 views

Using Raster Calculater to create .asc files in QGIS?

I have been trying to create an .asc file that contains the difference between two others. This can be represented as C=A-B. All files have the same size. When using the Raster Calculator built into ...