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
0answers
14 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 ...
0
votes
0answers
14 views

Map Algebra Raster output

I am running ArcMap 10.8.1. I took two aerial images from 2021 and 2020 and ran the map algebra raster calculator subtracting 1 from the other. I am trying to quantify tree morality by changes in ...
1
vote
0answers
29 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
1answer
23 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
1answer
33 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
2answers
24 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
0answers
32 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
3answers
100 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 ...
3
votes
1answer
47 views

QGIS Raster calculator - invalid expression

Hi all I'm trying to use the Raster Calculator tool in QGIS 3.10 Coruna on a slope map to isolate areas between 20 and 40 degrees of slope using the formula ''Raster1'' = > 20 AND < = 40. I keep ...
2
votes
0answers
25 views

Sentinel 1 creating ratio from polarizations

I am trying to perform a simple raster operation (In python) on two different bands (polarization VV and polarization VH) of the same SAR GRD product so that I have a co/cross-polarized ratio: VV/VH ...
0
votes
0answers
19 views

How to extract feature values to an existing raster?

What tool would I use to extract the value of a field in a polygon, store it in a raster, and perform a calculation, ideally without creating a new raster for each polygon I needed to look at? I have ...
1
vote
1answer
41 views

Calculating cell size of DEM in QGIS

I am using the following raster calculation to create a topogrpahic wetness index in QGIS. TWI/CTI = ln(a / (tan (beta)) where; a=Upland contributing area: [(flow accumulation + 1 ) * (cellsize)] ...
0
votes
0answers
52 views

QGIS 3.22 raster calculation crashes/ error code

I am trying to perform a simple Raster Calculation with an "if" query in QGIS 3.22. However, when I enable OpenCL acceleration, the calculation crashes around 36% and I receive an unknown ...
1
vote
1answer
52 views

Define the extent of QgsRasterCalculator

I have several raster files (.tif) in a folder that have different resolution and extent but are all in the same study area. Before merging them, I want to bring them to the same resolution (5 m) and ...
1
vote
1answer
44 views

Extracting pixel values from points and lines using Google Earth Engine JavaScript API

I am quite new to both Google Earth Engine and JavaScript. I have an LST image for all the regions. I want to extract LST pixels from east to west and from north to south around POI. Where the black ...
5
votes
4answers
179 views

Writing Conditional in QGIS raster calculator

I have a Digital Elevation Model raster with negative values in QGIS software, I would like to know how I can multiply all negative values by -1, ie all values less than 0, turning them into positive ...
0
votes
2answers
24 views

Recalculating raster values in ArcGIS Pro

I need to multiply two raster's using "Raster Calculator'. However, in one of the rasters I want to use the Values in a new field that I have calculated. But, when I use the Raster Calculator ...
0
votes
0answers
38 views

PyQGIS raster calculator code not working

I'm trying to write the raster calculator as part of a Python script for use with my other code. The below code runs with no errors but no output file is put in the directory. Can anyone advise me ...
1
vote
1answer
26 views

GDAL - Convert QGIS raster calc expression to valid syntax for gdal_calc

I have been using QGIS Raster Calculator to patch Raster Bs values in where Raster As are 0 using the below expression ("A@1" = 0) * "B@1" + ("A@1" != 0) * "A@1"...
0
votes
0answers
38 views

Running Raster Calculator in ArcPy gives RuntimeError

I am trying to add points at the lowest elevation in a group of polygons as described in the following link, https://support.esri.com/en/technical-article/000011761. The error I am running into comes ...
0
votes
0answers
14 views

Reclassifying DEM via Raster Calculator in ArcGIS Pro

I have a DEM which has min-max values of 85m to 121m. I need to reclassify it so that 85m-90m is 1, 91m-95m is 2, and so on. This is easy to do in the Reclassify tool but what's the expression if I ...
0
votes
0answers
9 views

Merge and Export LULC selected classes in QGIS [duplicate]

I had performed supervised classification using 8 classes. What I want to do is to merge its 6 class (lakes) into 7 class (river) and export it separately for further analysis. Does anyone know how to ...
2
votes
0answers
16 views

QGIS - how to offset raster 1 null values filled by raster 2

I have 2 rasters ... Raster 1 has null values of 0 which I have filled in by using values from Raster 2. To do so, I input the following expression into QGIS raster calculator: ("raster1@1" =...
1
vote
0answers
18 views

Calculating changes in NDVI in time using Landsat 7 image and Landsat 8 image

I'm trying to understand how much urban vegetation has changed in the past 20 years in my city. The plan is to calculate NDVI for Time1 and NDVI for Time2 and subtract them. BUT Landsat 7 images, that ...
0
votes
1answer
23 views

Adding additional Class to Landuse Map in ArcGIS Pro

I'm using ArcGIS Pro. I have a landuse raster with 8 unique classes. I have another raster with 1 unique class which I would like to go over my main raster (replacing everything on top of it) to ...
2
votes
0answers
21 views

Creating raster calculation function using QGIS

I'm using QGIS and working with satelite images, I want to operate over bands for many different dates so when I enter in raster calculation I have to write the operation for every pair of bands. Is ...
0
votes
0answers
11 views

Fill missing XYZ data with another dataset using ArcGIS Pro [duplicate]

I know this is a completely ridiculous concept, but it has been requested as a proof of concept, so I am determined to make it work. I have been given xyz data from 2 different surveys of the same ...
0
votes
0answers
32 views

Combining RGB layer with DSM layer to get new layer with 4 bands

I am a beginner in GIS. I have 2 layers, one having RGB bands while other having a DSM gray band. How do I combine them to get a layer having 4 bands altogether? I have tried using following tools ...
0
votes
0answers
30 views

Convert floating raster to integer raster keeping cell size

I have a float raster named co.tif with the following characteristics: I am trying to convert this raster to polygon, so the cell values are required to be integers. When I try to convert pixel ...
0
votes
0answers
22 views

Get all pixel values from superposed rasters

I have a set of rasters that overlap pixel by pixel, one of the rasters has more rows and columns than the others, however the position of pixels matches when they're superposed. I have created a ...
0
votes
0answers
39 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 ...
2
votes
1answer
69 views

QGIS Raster Calculator using Python to combine two layers

I am a QGIS beginner and I want to combine two layers using the raster calculator via Python. For the beginning, I simply want to add the two layers but currently, I don't get an output file. Code is ...
1
vote
1answer
53 views

Calculating NDVI percentage change in QGIS

I am trying to show how NDVI changed between two periods using raster calculator in QGIS. I stumbled upon one example that was done in ArcGIS which i have no access to but would want to do the same in ...
1
vote
0answers
35 views

Using information from vector file in QGIS raster calculator

Let's say I have a DTM and two vector shapefiles with zone A and zone B polygons. I want to add 10m to every point in the raster within zone A and I want to subtract 5m for every point in zone B. Is ...
1
vote
0answers
19 views

QGIS Version 3.18 Windows 10 - Layer separates in 3 different layers when calculating surface temperature

I've got this problem when calculating the land surface temperature from Landsat 8 data. I tried with different datasets but the problem is still occurring. I took some screenshots. Any idea? This is ...
2
votes
1answer
28 views

Sum of raster file in QGIS using Python Console

I have 8760 raster file for the precipitation in the netherlands on hourly base, from the first day of the year (01.01.2020) till the last hour of the year (31.12.20). What I have to do with these ...
1
vote
0answers
38 views

Calculating variance between raster layers using ArcMap

I have raster data that I would like to calculate the variance for different height stratas, ex. 05_10_cov represents density values for height strata between 5 and 10 feet and block_07_avg represents ...
0
votes
1answer
26 views

Raster calculator - negative exponential transformation gives single-value output

I'm trying to apply a negative exponential transformation to a raster with values ranging from 0 to 1. In the literature, the function to do so is R = 100 - 99 * ((1 - exp(- c * H)) / (1 - exp(-c))) ...
0
votes
0answers
67 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
0answers
38 views

How to calculate Land Surface Emissivity using QGIS

I am trying to calculate Land Surface Emissivity using QGIS When the NDVI is less than 0, it is classified as water, and the emissivity value of 0.991 is assigned. For NDVI values between 0 and 0.2, ...
0
votes
0answers
36 views

Converting float raster to integer failing in ArcGIS Pro

I'm trying to convert a 32 bit floating raster into an integer type using the 'int' spatial analyst tool within ArcGIS Pro (2.8.3). I have used the raster calculator to remove the decimals (in my case,...
5
votes
1answer
93 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 ...
1
vote
0answers
52 views

Raster calculator: IF (A-B=A) THEN reclassify

Without using any Python (i.e. only thru QGIS interface and its raster calculators), is there a way to perform and evaluation of a subtraction to be equal to one of the input rasters and, if true, ...
2
votes
1answer
84 views

Make one DEM file with the lowest points of two overlapping DEM files with QGIS

I have two rasters DEM files which are exactly overlapping. Now I want to have a new file with the lowest points from both DEMs. I think Raster calculator can do such things, but I dont know how. How ...
2
votes
0answers
41 views

Why does GDAL raster calculator treat no data as infinity?

I am using GDAL raster calculator in QGIS. I was getting some funny results where my input raster had "no data" so I ran some tests. (5<no data) gives 1 (5>no data) gives 0 10 - no ...
2
votes
1answer
225 views

Merge two overlapping rasters and only take values from one raster in the overlapping areas in QGIS

I have two raster files A and B which overlap in certain areas. These rasters should be merged to one while taking the exact values of raster A, and hence overriding/replacing the values from raster B ...
0
votes
0answers
23 views

Rounding a raster to the hundredths place in ArcGIS Pro

I'm trying to round a raster with only positive values to the hundredths place in ArcGIS Pro. I found two formulas here on the Stack that would successfully round some of the values and others they ...
4
votes
1answer
35 views

Modify raster pixels based on another raster layer

I have two raster layers. One layer contains the data of the first day a pixel experiences degrees Celsius above a certain threshold. The other layer contains hotspots in Iceland. These hotspots ...
1
vote
1answer
53 views

Reclassifying raster in QGIS

I'm modelling species distributions using Maxent. Maxent produced probability of occurrence/habitat suitability maps for my study species. These raster maps have values ranging from 0 to 1. I want to ...
0
votes
1answer
121 views

rioxarray: zero-size array to reduction operation minimum which has no identity

I'm trying to subtract one raster from another. They have a slightly different shape/extend but the same CRS/resolution. While attempting to subtract the raster, I received this error: 'zero-size ...

1
2 3 4 5
22