Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [raster-calculator]

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

0
votes
0answers
8 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 ...
1
vote
0answers
11 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 ...
0
votes
0answers
14 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 ...
0
votes
1answer
13 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 ...
1
vote
1answer
27 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....
1
vote
2answers
55 views

QGIS - raster calculator syntax

I am having problems using the raster calculator. Some pixels of my GeoTIFF file have the value 255 on bands 1, 2 and 3. I want to replace this value with 0 on the three bands. I tried with this ...
2
votes
1answer
30 views

Sum multiple rasters using raster calculator, the result raster had a larger cell size?

I have 365 rasters (daily) and therefore I summed them to form an annual raster using raster calculator in Arcgis. The original cell size of daily raster is 5*3.75 (col 72, row 48), while the cell ...
1
vote
1answer
46 views

QGIS 3.6.2 with GRASS - raster calculator - Raster1 + Raster2 returns missing pixels

I have 5 large point datasets (shapefiles) and I'm interested in getting a heatmap on the combination of all 5 point layers. I use the QGIS heatmap tool to create a heatmap on each layer. This is ...
2
votes
1answer
36 views

Replace the empty cells of one raster with the values of a second raster

I have 2 rasters with the same extent. In the first raster, there are a lot of empty cells that I want to replace by the values of the second raster. I have tried Raster calculation with the following ...
0
votes
0answers
17 views

Losing raster quality when using raster calculator (ArcGIS Desktop 10.5.1)

I'm currently working with DEM rasters that I hillshaded. The data I received contain nodata borders, probably the footprint of the originial mosaic dataset. As I received them separately, I can't ...
1
vote
1answer
52 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?
0
votes
1answer
29 views

Switching Mars DEM elevation values from negative to positive?

I'm using a DEM of Mars I got from UA's HiRISE website, and I want to convert it into an STL for 3D printing using the DEMto3D plugin. However, the raster values are all negative, so I thought I ...
2
votes
0answers
33 views

Writing Raster Calculator Expression?

I use ArcMap 10.3. How do I create an expression in RasterCalculator that allows me to sum up 4 rasters (every pixel has an associated value) and the result to be 0 if any of the 4 values is 0? For ...
0
votes
1answer
22 views

Creating new raster with minimum (or maximum) value betwen two rasters in ArcMap?

I am using ArcMap 10.3. I have two temperature rasters from two months. I need to create a new raster from these, but the new raster should have in each cell the maximun value betwen the initial ...
2
votes
1answer
30 views

Raster calculator - set default output path - QGIS 3.4.6

Raster calculator: How can I set the default output folder? By default it's set to "C:\Program Files\QGIS 3.4\bin" I'm using QGIS 3.4.6
2
votes
0answers
38 views

Confusing result of raster calculator in QGIS

I'm confused about the results that I get from the raster calculator in QGIS. I'm trying to delete the cells of a raster who are prone to flooding. However, a part of my raster is wrongly classified ...
1
vote
0answers
12 views

Discrepancy between raster calculator and geomorphic change detection elevation change results

I am using two rasters to determine the elevation change in a stream channel. When I used the Geomorphic Change Detection Software add-in (version 7.4.1), I got a high elevation change of 8.8 ft and ...
2
votes
1answer
40 views

Counting .tif value in polygon in QGIS

I am trying to count raster values (from a .tif file) in polygons. In previous posts that people suggested using the 'zonal statistics' plugin in QGIS. However, I couldn't find it in my plugin manager ...
1
vote
1answer
40 views

Ordered weighted averaging error QGIS

I am trying to use Ordered weighted averaging to sum up values across different raster overlays in QGIS 3.4.4, but I get this error: Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.4/...
0
votes
0answers
35 views

From raster to polyline in QGIS

I'm trying to extrat ridges from ALOS images on qgis. I would like to have polylines so I can use the plugin AutomaTracks from Sebastien Peillet. I did inversed the MNT using raster calculator then ...
0
votes
2answers
19 views

Performing Raster Calculation?

This is my formal: ("Standort_ger_fre_mosaic" ^ 0.4) * ("Habitattradition_raster_rec.tif" ^ 0.3) * ("Vollständigkeit_rec.tif" ^ 0.1) * ("Vorkommen_ungestörter_Lebensräume_rec.tif" ^ 0.1) * ("...
0
votes
1answer
30 views

ESRI Raster Calculator error “Con()”

I"m trying to nest expressions in this raster calculator conditional statement, but I get an error. This statement works, so I tried to follow it as a template: Con (IsNull("ras1"),"ras2","ras3") ...
0
votes
1answer
61 views

ArcMap Raster Calculator with Python code

I'm trying use raster calculator that can export a raster to do different average values for for multiple layers. For example, I want to do averages for only the values and layers that are greater ...
2
votes
1answer
57 views

Getting rid of cells of 0 values in raster using QGIS?

I have a DEM like below image. The black area shows 0-values. I want to remove cells of 0-values in the raster.   In raster calculator, I wrote con("demclip_re@1">0,"demclip_re@1") but it gives "...
1
vote
1answer
61 views

Getting QGIS Model Processing Raster Calculator Error?

I am using "raster calculator" tool of the saga in my model. The tool correctly executes raster operation like "a * 2" in value formula option but the same expression is not executed pre-calculated ...
0
votes
0answers
17 views

Con statement with multiple AND fails

I have a conditional statement that runs through multiple rasters. It produces the correct output in Raster Calculator but not when I run the code. I don't get any errors, it just creates blank ...
1
vote
1answer
44 views

Solving ERROR 000732: Input Raster: Dataset Con( does not exist or is not supported in for loop? [duplicate]

I'm trying to reclassify rasters based on standard deviation. I created this code, but I think I'm wrong using "Con". I would like to assign value 1 to rasters >= to threshold and rasters <= to ...
1
vote
1answer
29 views

How to stack points based on their latitude and longitude value on a raster image in QGIS

I have a Sentinel2 image. I have a CSV file that contains latitude, longitude and precipitation data over the location where the sentinel2 image was taken. Now I want to stack the precipitation data ...
1
vote
0answers
19 views

Attribute Table missing After Raster Calculator?

I want to remove zero value pixels from MODIS LST raster images and apply a moving window that can only substitute the missing values and leave the other original values with out alteration. I have ...
1
vote
0answers
29 views

Checking for exact value in QGIS raster calculator

I would like to single out values which are equal to a certain floating point value using QGIS raster calculator. I tried to run the following: "Converted@1"==-3.40282347*10^38 But I got the error ...
0
votes
2answers
61 views

Pixel depth and raster output won't align with the original

The problem Need to convert a raster .tif tile (DOWNLOAD) from WGS84 to GDA94 Albers; Need to convert its stored pixel info from Float32 to 8 bit UNSIGNED; Need Compression set to "NONE"; Need to ...
1
vote
1answer
39 views

How do I build a new raster based on raster stats in QGIS?

I want to create a new raster that uses the mean value of the original raster as the base class of the image and then uses a +- 1 and 2 standard deviations as the other four classes of the image. Is ...
1
vote
2answers
38 views

Replacing value of specific pixel using raster mask in ArcGIS Desktop?

I have two rasters: the first is a basin with all pixels values equal to 0. The second raster (mask) has a single pixel with value = 1. In fact, I need only one raster where all the pixels into the ...
1
vote
0answers
140 views

QGIS RASTER CALCULATOR - Getting the Minimum and Maximum Values of a Raster Layer

I try to work with the minimum and maximum values of a raster layer in the raster calculator in QGIS 3.6. I try to do the following formular: ( @RasterCellValue - @RasterMinValue ) / ( @...
3
votes
2answers
149 views

QGIS Version 3.6 Raster Calculator

In the previous version of QGIS when you loaded a multiband color image into raster calculator the bands were separated. In version 3.6 I am only seeing 1 band how do I get the other bands displayed ?...
1
vote
0answers
123 views

QGIS Raster Calculator missing bands

I've created a VRT from some 6-band TIFF tiles. The VRT displays perfectly in QGIS 3.6 and I can see manipulate the band arrangement and create different composites. However, when I open the raster ...
0
votes
0answers
40 views

ModelBuilder and Raster Calculator Error 000539?

I'm currently working in ModelBuilder trying to use the Raster Calculator and I keep getting the error message 000539. The error according to ESRI says it's an invalid pathway. What I have circled ...
2
votes
0answers
40 views

QGIS Problem adding two rasters

I have a DEM of terrain that I have successfully added a raster of woodland to: I am trying to add to that a raster of a built up area, but the extent of the settlement raster is smaller than my ...
1
vote
0answers
65 views

gdal_calc.py result are false and not the same as “direct” calculation

I need to do the raster calculator operation as "raster + constant" in Python. The input rasters are DEM data with float original type and -9999 for the NoData. The constant is float too. In 1st way, ...
0
votes
0answers
28 views

Calculating Raster Percentile Values in ModelBuilder

I want to calculate the 75th percentile value of a raster dataset (floating, 32Bit) and use this value as an input to a set null expression. I have multiple rasters to perform this on so I need to ...
1
vote
1answer
122 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 ...
2
votes
1answer
60 views

Combining overlapping rasters in ArcGIS

I have two DSM rasters, one is 10km radius photogrammetric data, the other is 2km radius LiDAR data, both centred around the same point. I need to combine these together, essentially inserting the ...
1
vote
2answers
111 views

How to create a single raster based on the values of three rasters (Conditional)?

I have three rasters of soil granulometric fractions (clay, sand and silt), all in %. I want to make a single raster of the soil texture classes. For that, I need to make some conditionals (i. e.: ...
0
votes
0answers
40 views

NDSI Classification : Output Raster <empty>

I generated an NDSI image in GeoTiff format that have values ranging from -1 to +1 . Now, I want to classify the image using a threshold of 0.4 to classify it into Snow and Non Snow . For the same, I ...
1
vote
1answer
45 views

Piping one SAGA Raster Calculator output into another chaining algorithms in QGIS processing script?

I am using QGIS 2.18.15. I want to streamline multiple SAGA raster calculator calculations using the output of one calculation (not loading it into the table of contents) as input raster for the ...
0
votes
1answer
77 views

Adding building and woodland heights to raster DTM using QGIS 2.18.19

I am using QGIS 2.18.19 to produce viewsheds of a proposed development to show where the development would in theory be visible from. I am using Ordnance Survey Terrain 5 as my height data (*.asc) ...
3
votes
1answer
94 views

SAGA Raster Calculator in QGIS Algorithm script produces 'NoneType' object has no attribute 'crs'

I would like to produce a new temporary raster after a calculation with the SAGA raster calculator using a custom python algorithm script. This is my code so far: ##MaechtigkeitunterhalbeinerHoehe=...
1
vote
1answer
28 views

SAGA Raster Calculator processing script give error “name 'Rasterout' is not defined”

I am trying to build a custom script using things I have learned from this post: Number inputs as raster calculator variables in QGIS Modeler This is my script so far: ##Maechtigkeit unterhalb einer ...
0
votes
0answers
23 views

Making QGIS model that iteratively creates several constant grids at once?

I'm looking to calculate the volume of a virtual reservoir from a DEM. I would use a constant grid (SAGA) to represent the ceiling, and I want to see the change in volume for each 1 metre interval. So ...