# Questions tagged [raster-calculator]

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

811 questions
Filter by
Sorted by
Tagged with
0answers
11 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 ...
2answers
936 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 ...
1answer
30 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 ...
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 ...
2answers
10k views

### Averaging set of rasters using Raster Calculator of ArcGIS Desktop?

How do I average a set of rasters? I have remotely sensed chlorophyll a rasters for several days and I need to get an average of the days represented as one raster layer. I am using ArcMap 9.2.
1answer
6k views

### Remove (or SetNull) areas of overlapping rasters using ArcGIS Desktop?

I am using ArcGIS Desktop 10.1. I have one raster layer that is a site suitability layer for a county. Then I have two feature classes (one for roads and one for hydrology) that I need to remove or ...
0answers
15 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" > ...
1answer
20 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 ...
1answer
31 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,...
0answers
23 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(...
1answer
20 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 ...
1answer
50 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 ...
1answer
2k views

### Raster Calculation in Qgis using Python Script

I want to do raster calculation over raster layer for which i am using python script as: from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry bohLayer = qgis.utils.iface....
0answers
28 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 ...
0answers
38 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 ...
1answer
162 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 ...
0answers
25 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 ...
1answer
50 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))*"...
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....
1answer
29 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?
0answers
10 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.
1answer
15 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) ...
1answer
58 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 ...
1answer
32 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 ...
2answers
21 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 ...
1answer
36 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) ...
1answer
27 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-...
0answers
21 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 ...
0answers
16 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 ...
1answer
39 views

### GDAL Calc Set Specific Values to Another Number

I have a GeoTiff raster with a format of Float32 and values 0.00 to 5.00. I am attempting to change all raster cells with a value below 0.10 to 0.10, and leave all other cells in the raster dataset ...
1answer
31 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 ...
0answers
25 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 ...
2answers
37 views

### Raster Symbology Calculate Area Acres

Using ArcMap, I am trying to classify/consolidate the symbology of these agriculture classes into 3 categories: Hay, Pasture/Grass, and Cropland. I also need to find the sum of acres of each of these ...
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 ...
0answers
15 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 ...
1answer
136 views

### Land masking in ArcGIS Raster Calculator?

I'm trying to mask land in a raster and just wondering if anyone knows how to do this. I tried using the raster calculator by producing a new raster based on a threshold value but my output raster is ...
1answer
32 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 ...
0answers
30 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 ...
2answers
62 views

### Extracting a single value to a new raster from a singleband pseudocolor raster image

I have a large raster image depicting land use. It's a singleband pseudocolor image whose values are contained in a text file. There are 5 classes. Following the example of this question I thought I ...
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 ...
0answers
29 views

### How to use the Raster Calculator in PyQGIS (Console) in QGIS 3?

I want to use a script to do some raster calculations. I found this and this posts which seem to answer this question, however, it seems that they work for QGIS 2 and not for QGIS 3. I think the ...
2answers
333 views

### Producing raster A + B where A and B intersect, and A where they do not, using QGIS?

I have a raster A (a heightmap created from a contour file). I also have created a vector layer with some polygons which I rasterized into raster B. Raster B is completely contained within the extents ...
2answers
91 views

### Computing NDVI in ArcMap from Landsat 8 “Analysis-Ready” Surface and TOA Reflectance Products

The internet is full of various contradictory advice on corrections one can make to get NDVI computed from Landsat 8 to fall between -1 and 1. This is for instructional purposes, so I hope to use ...
0answers
16 views

### Intersect multiple binary rasters based on certain criteria in ArcMap

I have multiple binary raster image (0.1). For example if I have n images, how can I extract the pixels that has the value of 1 and frequently occurred " the same pixels" in 70% of the n images (for ...
1answer
65 views

### Using ArcGIS Pro raster calculator to give cell value based on cells in its neighborhood?

I have a land cover dataset, I want to find forested cells that are adjacent (touch) agricultural cells. Is there a way I can achieve this with the ArcGIS Pro raster calculator?
1answer
19 views

### Extract one specific value by resampling via rastercalc

I am trying to extract specific areas from the following image: The grey areas are those of interest, they have a distinct RGB-value of 220-220-220. Thus, in my logic, the following code should ...
1answer
32 views

### Max value for each cell

I am using ArcMap. I have 12 raster layers with coincident pixels, which have different values. I would like to, for each pixel location, pick the pixel from all 12 rasters which have the same value. ...
1answer
38 views

### PyQGIS problem with QgsRasterCalculator CRS definition

from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry import processing from osgeo import osr, gdal from gdalconst import * dataset1 = gdal.Open(input1, GA_Update) band1 = dataset1....
1answer
134 views

### How do I input this function to “Raster Calculator” in Model Builder , in ArcGIS 10.2? [closed]

The raster files that function refers are as follows: Precipitation (o “Raster” in figure 1): Variable CN_2S_7ma: Constant CN_8S_7ma: Constant The mathematical function that must be entered is as ...
1answer
288 views

### Selecting raster cells by multiband values in QGIS

I have a raster of roads saved from a WMS, this a multiband raster. Its red(main) an grey(back) roads. When using the raster calculator I can select most of the red road by using: Band@1 > 200 ...