Questions tagged [raster-calculator]

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

Filter by
Sorted by
Tagged with
19
votes
2answers
37k views

Cropping raster layer using QGIS?

How do I crop a raster layer in QGIS? I want to make contours from a section of a layer, and including the whole layer will create far more data than I need and slow down the rendering. I have ...
18
votes
1answer
1k views

Calculating Focal Statistics for Special Neighborhood?

I'm looking to calculate focal statistics for each cell of a raster, within a neighborhood of a specified criteria. Background - I have three binary rasters, each representing a single vegetation ...
11
votes
2answers
5k views

How to calculate the number of cells with a given value?

I have a raster file where all cells have values between -3 and 7, no data value is -9999. How can I calculate the number of cells with a specific value, e.g. 6? Can I use the calculator?
11
votes
1answer
938 views

r.mapcalc does not give output in QGIS

For a while now I have been trying to use r.mapcalc from the QGIS Processing Toolbox. However, the algorithm does not give me any output. I have tried several raster layers and different expressions, ...
10
votes
1answer
2k views

Calculating distance from points to different class in raster using ArcGIS Spatial Analyst?

I am looking for some advice on how to calculate the distance from a point to a different class of a raster. Specifically, I have observations (points) of animal use overlaid on land cover data. ...
10
votes
1answer
525 views

Cube root on ArcGIS raster calculator?

How I could extract a cube root of the multiplication of 3 rasters in raster calculator? Eg: cuberoot (ras1 * ras2 * ras3)
9
votes
2answers
5k views

Using individual bands from multi-band image in ArcGIS raster calculator?

I'm trying to use individual bands from a multi-band TM image (IMG file) within the raster calculator in ArcGIS 10 (SP2/3). I can add individual bands to my MXD, but raster calculator will only use ...
8
votes
2answers
7k views

Normalize raster values to 0-255

I need to normalize the values attained from a band ratio to 0-255. I'm using QGIS. How do I do this? Any ideas?
8
votes
3answers
3k views

30,000 data points… can this be reasonably served using openlayers?

I'm trying to tackle a web GIS problem and need to figure out the best strategy. I have a map with 30,000 cells on it forming a grid for the province of Alberta. I have a list of data points for ...
8
votes
3answers
4k views

Why does every raster calcuation I try return with NAN values?

I am trying to work with DEM rasters from the USGS using the raster calculator. I have tried to change the units from meters to feet using an expression such as: "ned10m45111h8@1" * 3.28 However ...
8
votes
2answers
596 views

Rules of Nodata value?

What are the arithmetic rules that govern Nodata values? Regardless of how these null values are defined? I am using ArcMap Raster Calculator. I am thinking specifically of operations like 1*Nodata (...
8
votes
1answer
5k views

Making new raster using con() script using ArcPy?

I'm new to Python and have been trying to code a raster calculator style script. Basically, I want to convert a raster that has values 0 to -10,000 into a raster that is populated by 1s between ...
7
votes
3answers
11k views

How to standardize raster output from 0 to 100 using raster algebra?

I am working on generating an integrated moisture index based on the following equation: IMI = (hill shade * 0.5) + (curvature * 0.15) + (flow accumulation * 0.35) Iverson et al. 1997 Another ...
7
votes
2answers
6k views

Conditional Statements in QGIS raster calculator?

What is the equivalent statement of the following expression in the QGIS raster calculator? Con(((Abs("DEM" - "FSMin") > 120) | (Abs("DEM" - "FSMax") > 120)), 1, 0) I have no problem ...
7
votes
1answer
4k views

How to evaluate raster calculator expressions from the console?

How can I execute from the console an expression that should be used with the raster calculator? I'm searching for something like this: qgis.someRasterCalcClass.evaluate("boh@1 + boh@2", "outputfile....
7
votes
1answer
214 views

Raster calculator reclass 0 as 0 QGIS

I want to process a raster with values 0-16. I want to set all values between 1 and 15 as 1, a value of 16 as 0 and cells with a value of 0 as 0. How do I maintain a cell value of 0? I have tried ...
7
votes
1answer
3k views

Change NODATA pixel value in raster to arbitrary value

I want to change the value in all pixels that are currently 0 to 800 in QGIS 2.6.1. 0 is listed as the no-data value in Properties > Transparency. I have unchecked the No Data Value box there. Then I ...
7
votes
1answer
1k views

How can I change the class of one pixel in a classified image?

I have a classified image (I did it in ERDAS) with six categories. There are some misclassified pixels (especially high-density urban category). Is there any way that I can choose one pixel and then ...
7
votes
1answer
620 views

Working with NaN/null and different extents in QGIS Raster calculator?

When it comes to NULL value and different extents of rasters I find it extremely cumbersome to use QGIS raster calculator. As far as I am aware there is no way to operate with NaN/Null value. So no ...
6
votes
2answers
3k views

how to get max and min from a raster using arcpy?

I have a land surface temperature raster file and I want the max and min of it. minLSTresult = arcpy.GetRasterProperties_management(raster_result, "MINIMUM") minLST = minLSTresult.getOutput(0) ...
6
votes
2answers
6k views

How to calculate the difference between two rasters in QGIS?

I have two similar rasters of the Mount Vesuvius and surroundings: one spans 20 kilometers, and the other one 50 kilometers. The two rasters are overlapping: What I would like to do is to create a ...
6
votes
1answer
2k views

Performing Raster Calculator functions using Python and open source modules?

I would like to perform mathematical functions similar to those you would use Raster Calculator for in ArcMap, however I'd like to do it in Python without using the ArcpPy module. I have the osgeo ...
6
votes
1answer
5k views

How to exclude outliers from raster using ArcGIS for Desktop?

I calculated terrain curvature from a DEM. The DEM I use is interpolated from point elevation data. Generally, the DEM seems to be good, but some artifacts from interpolation exist. Those artifacts ...
6
votes
1answer
454 views

Calculating urban areas that need pharmacies using QGIS?

I'm very new in QGIS. The task is to calculate the urban areas that has lack of pharmacies. I have buildings points with apartments count and existing pharmacies points. Then I made two raster ...
6
votes
2answers
482 views

Adding all Binary Rasters in a Directory Using Raster Calculator in a Standalone Python Script

I have a directory with binary raster files (1 band only) which I need to add in a standalone python script. The problem is the rasters have different number of rows and columns and different ...
6
votes
2answers
452 views

Automating creation of toe of slope from DEM using ArcGIS for Desktop?

I was looking for an automated process to "identify" the toe of a slope from a DEM and ran across this ESRI thread and technique: I am at Step 7 but have no idea how this is accomplished. I get it is ...
6
votes
2answers
2k views

How do I generate a random raster (or probabilistic cellular automaton) in QGIS?

I'm trying to create something like a cellular automaton land cover change model using QGIS, in which cells randomly change land cover based on probabilities determined from various input rasters. I'...
6
votes
3answers
2k views

Adding two raster datasets that overlap while maintaining extent of larger raster dataset?

I am using ArcMAP 10.0 How do I add two raster datasets that overlap while maintaining the extent of the larger raster dataset. I have thought of adding zero values to the smaller raster to then be ...
6
votes
1answer
1k views

How to calculate a standard deviation across multiple raster layers?

I have 15 raster layers. Each one shows accumulated precipitation (rainfalls) for the month of April for the same US state during a given year. So, I cover the period from 1997 to 2012. I would like ...
6
votes
1answer
279 views

EVI calculation from UAV multispectral survey

I want to calculate EVI index from UAV multispectral survey. For satellite imagery it is pretty straightforward (after reading multiple posts on GIS.SE) but not sure how to approach this problem, when ...
5
votes
5answers
10k views

Normalizing raster using raster calculator in ArcGIS 10.3.1? [duplicate]

I have been trying to 'range standardise' or normalise my raster values from 0-100 and I know how to do this mathematically: ("raster"-min("raster"))/(max("raster")-min("raster"))*100 and I have ...
5
votes
1answer
9k views

Conditional calculation - QGIS Raster Calculator or GRASS r.mapcalculator

Is it possible in QGIS either directly or via plugins to do a raster calculation including an if statement? e.g., if raster1 > 0.3, then raster 1 * raster 2, else raster1 x raster3...something like ...
5
votes
1answer
2k views

Raster Calculator making incorrect calculations in ArcGIS Desktop?

I am trying to use raster calculator (ArcMap 10.2.2.3552) to apply a poisson generalized linear model to estimate species abundances based on elevation. The outputs don't make any sense to me, and I'm ...
5
votes
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.
5
votes
1answer
1k views

Exponential function in QGIS

Can I convert this exponential function in QGIS with Raster Calculator ?
5
votes
1answer
1k views

Rescaling NDVI values 0-255 to [-1;1] using ArcGIS Raster Calculator?

How do I rescale NDVI values that are 0-255 to -1;1? I'm trying to do it in ArcGIS Desktop.
5
votes
2answers
6k views

Specify a field in attribute table with raster calculator

How can I specify the attribute field to use in the raster calculator of ArcMap 10.2? In 9.x, I used the dot notation. i.e. To use the "New_Value" field, I could do the following: [MyRaster]....
5
votes
2answers
343 views

Raster calculation confusion

I need to do some raster calculation, I've been trying to make it work but I am not sure everything is working properly. I need to apply a formula, but I am unsure if I am doing it properly. The ...
5
votes
2answers
2k views

Rounding raster values in QGIS raster calculator?

Is it possible to round raster value in QGIS to a given number of digits? I have raster data with temperatures as values but the authors have made the values Celsius * 10. That is, a temperature of 2....
5
votes
2answers
3k views

Querying slope data using raster calculator: why are all results true?

I am using ArcGIS 10.2.2. From a DEM, I have created a new raster showing slope using the slope tool. The color scheme was automatically classified into 9 tiers. What I want to do is query this raster ...
5
votes
1answer
8k views

extend the size (area) of raster

My problem is that I would like to multiply two rasters using raster calculation tool. Both rasters have values 0 and 1, but the covered area of first raster is bigger (100 x 100 miles) then the area ...
5
votes
1answer
2k views

How to reclassify in Rastercalc?

I now need to reclassify, I'm using rastercalc... but I can't get the syntax right!! I need that values >0 become 1 I found this example... eq( [relief]@1, [mask]@4, 150 ) so I tried: ( [raster A ...
5
votes
1answer
322 views

How to center continuous raster layer by subtracting mean and dividing by standard deviation using QGIS raster calculator?

I'm trying to extrapolate a spatial model to a map in QGIS using the raster calculator. The model predicts the value of a pixel given the environmental conditions at this location (e.g. elevation, ...
5
votes
2answers
12k views

How to use OR in a CON statement, in the ArcGIS Raster Calculator?

I'm trying to compare two rasters, and create an output based on a formula like: if raster1 > 10 or raster2 < 20 then raster3 = 30 How can I specify the OR in the raster calculator's CON ...
5
votes
1answer
1k views

How to exclude some parts of raster classes based on size of area?

I have a raster file with 5 classifications. I've calculated area for all of the classes via Zonal geometry, Arcmap 10. Now, I want to exclude patches which are smaller than 100 sq. km. and re-...
5
votes
1answer
6k views

Convert 0's to NoData in QGIS Raster Calculator [duplicate]

What is the easiest way to convert cells with a value of 0 to NoData in QGIS Raster Calculator?
5
votes
1answer
107 views

Sequentially distilling several raster data sets into final map based on first time pixel’s value was greater than zero?

I have 120 daily data sets that contain a value only when a threshold temperature is exceeded. If the threshold has been reached that pixel was assigned a value indicating the day it occurred (the ...
5
votes
1answer
573 views

Calculate Volume over sloped ground in GRASS GIS

I am trying to do some volume calculations on a DEM with GRASS GIS. However, I believe r.volume measures everything from 0. The ground underneath the pile I'm measuring is sloped. I would ...
5
votes
1answer
244 views

Calc bottomline of valleys

Which way do I calculate bottomlines of valleys or even more preceise: which way do I "find" valleys (for example suggested tectonic faults). Sample below shows a height profile (profile from line) ...
5
votes
1answer
561 views

Compare two raster extents in QGIS

I have two grids, grid A representing observed extents of flooding and grid B representing simulated extents from a hydraulic model. The rasters have the same extent and grid size. I want to be able ...