Questions tagged [map-algebra]

combining map data of similar dimension to produce new maps using algebraic operations

Filter by
Sorted by
Tagged with
1 vote
1 answer
46 views

Moderate raster values based on another raster

I am trying to make a soil erosion risk model using raster overlay in ArcGIS Pro. I have calculated soil erosion risk in raster calculator by combining the following risk factor rasters: slope ...
Bill's user avatar
  • 43
1 vote
1 answer
62 views

Raster calculator multiple expressions

i have the following rasters: soilrisk, slope, rainfall How can I create an expression that meets the following conditions? (Soil risk = 1 and Slope > 7 and Rainfall < 800) OR (Soil risk = 1 and ...
Bill's user avatar
  • 43
1 vote
0 answers
36 views

Issues using random raster, possibly mismatched extent [closed]

I am very much a beginner in using ArcGIS Pro. I have two rasters, call them Col1.tif and Col2.tif. I want to create a new raster that randomly chooses either the value from Col1 or Col2 with 50% ...
user434180's user avatar
1 vote
0 answers
130 views

Addition of two rasters in PostGIS

I have two rasters (prast and frast) in PostGIS each with 1 band and with the similar extent and pixel characteristics (They were originally different bands of the same raster before I did some ...
rm167's user avatar
  • 459
0 votes
0 answers
181 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 ...
BallpenMan's user avatar
  • 1,217
1 vote
1 answer
678 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 ...
Donald 's user avatar
0 votes
1 answer
147 views

Multiplying rasters by rasters within PostGIS

I have a situation where I have to multiply sets of rasters by each other. Currently I have subfolders of rasters on my machine and am looping through them and multiplying them with rasterio. Is there ...
Craicerjack's user avatar
0 votes
0 answers
86 views

Giving input of multiple rasters in Raster Calculator of ArcGIS Desktop

I want to add-up more than 100 raster datasets to derive the sum of all. Adding all these one by one in calculator using basic algebra expression is time consuming. Can anybody suggest me how can I ...
sushant sawant's user avatar
1 vote
1 answer
62 views

Using Map algebra to "burn" a river into a a landcover map using GRASS

I have a map of various polygons where each polygon represent the cost of passage for different vegetations (values range from 10-50). I have a separate map of a river, where the river currently has a ...
GRASSGIS123's user avatar
2 votes
2 answers
106 views

Using map algebra get minumum and maximum value in ArcMap

I am looking for an easy solutions with Map Algebra for this one without Saving: # Import system modules import arcpy from arcpy import env from arcpy.sa import * # Set environment settings env....
Meeett's user avatar
  • 31
3 votes
1 answer
269 views

Map algebra with loop and SetNull not working

I'm trying to run a loop through a number of rasters while using SetNull but keep receiving an error message. I have worked on these rasters individually using SetNull and it it works, but would need ...
tsm's user avatar
  • 31
1 vote
1 answer
156 views

Arcpy reclassify with function

I have two rasters, one with NDVI values, and one with greyscale values (=(red band + green band + blue band) / 3). The rasters have the same name. I need to reclassify them in arcpy with the ...
GIS7's user avatar
  • 348
0 votes
1 answer
190 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 ...
alextc's user avatar
  • 2,013
2 votes
1 answer
215 views

Rescaling DEM for Blender

I'm working on getting some DEMs ready to bring into Blender to render hillshade. I've done this successfully before with low elevations, but on my current project mountaintops seem to get cut off. ...
Megan's user avatar
  • 101
1 vote
1 answer
83 views

What is this Map Algebra expression performing in ArcGIS ModelBuilder?

I was given a model my someone else, and am trying to decipher exactly what they are doing. There is a step in the model which has the following expression: SetNull("%Raster1%"<0,"%Raster 1%") ...
Jared's user avatar
  • 335
1 vote
3 answers
142 views

Showing two sets of points from two different fields in QGIS?

I made a union of two adjacent shp (points) files with the same theme (Geochemistry) so the resulting attribute table gave duplicated fields, for example: ID, As_ppm, Ag_ppm, Pb_ppm, ... , ID_2, ...
cavereaper's user avatar
0 votes
1 answer
144 views

Creating custom Operation for encapsulating some map algebra using GeoTools?

In GeoTools, I need to perform a one-to-one pixel computation between a bunch of GridCoverage2D. In short: some map algebra. As I understood I can do things like summing values of coverages using: ...
mcfoi's user avatar
  • 165
1 vote
0 answers
62 views

Using minus in water drainage model

I'm doing a lab and I'm trying to understand exactly why I'm using the tool "minus". I have a raster which I'm calling "heights". I also have two rasters with water surfaces and watercourse. I have ...
Ribban's user avatar
  • 11
0 votes
0 answers
104 views

Using tool "minus" in height model?

I'm doing a lab and I'm trying to understand exactly why I'm using the tool "minus". I have a raster which I'm calling "heights". I also have two rasters with water surfaces and watercourse. I have ...
Ribban's user avatar
  • 11
0 votes
3 answers
2k views

Working with 2 rasters, having different extents but same resolution, in ArcGIS raster calculator?

I am working with 2 rasters, having different extents but same coordinate system and resolution, in Arcgis 10.5. The larger raster has 0 and smaller raster has 1 values. I want to make a new raster ...
Santosh's user avatar
  • 31
0 votes
1 answer
332 views

Converting DEM units using Map Algebra and Python

I am trying to write a bit of code that combines a bunch of DEMs that match up perfectly and convert the elevation values of the pixel cells from meters to feet. This is all using Pyscripter and ...
Smithw1's user avatar
  • 335
1 vote
2 answers
190 views

Reclassify in python doesn't reclassify things

I'm trying to reclassify the pixel values of NLCD_2011 data to a binary representation of developed vs. undeveloped land. import arcpy arcpy.CheckOutExtension("Spatial") nlcd = ('file ...
itshardtofindanunuse's user avatar
1 vote
1 answer
2k views

Merging two rasters, obtain only highest values, overwrite raster in ArcGIS Desktop?

In order to run a hydrologigal analysis I'd like to to merge two raster datasets (DEM and buildings) to get as result one raster with only the highest values (elevations) of both. In other words: To ...
Maja Ott's user avatar
  • 425
1 vote
2 answers
1k views

ExecuteError: ERROR 000539 while running expression rcexec()

from arcpy import * arcpy.CheckOutExtension('Spatial') arcpy.env.workspace=r'D:\work\USA' #pathway to all rasters in workspace directory rasters = arcpy.ListRasters('*.tif') # Local variables: ...
Robot's user avatar
  • 11
1 vote
0 answers
124 views

Iterate a multistep Map Algebra

I am trying to write my first ArcPy script to iterate a Band Math process with requires a few steps. The uniterated, working script for a single group of bands in one Landsat scene is: #import ...
Abby's user avatar
  • 11
2 votes
1 answer
381 views

ArcGIS Raster Calculator Con-Statement

I am trying to manipulate bad pixel values in a raster by using the Con-Statement via ArcPy. Using the build-in Map Algebra function "Raster Calculator", the results are good. To transfer the work ...
Andi90's user avatar
  • 103
1 vote
1 answer
2k views

Gdal_calc NDVI for many rasters

Can anybody help me to solve a problem with running gdal_calc for many rasters? I have several multispectral images and I need a batch to perform NDVI calculation. I started with gdal code for one ...
MayLadyBeetle's user avatar
1 vote
1 answer
222 views

Get argmax of PostGIS raster bands

I have a four band raster, and I would like to generate a new raster that has the argmax of the bands for each pixel. For example, if band 3 holds the maximum value at that pixel, the new raster ...
amball's user avatar
  • 1,542
2 votes
2 answers
3k views

Calculate NDVI using ArcPy Spatial Analyst

My goal is to calculate NDVI using map algebra syntax. import arcpy from arcpy.sa import * red_band_raster = (r"C:\B3.tif") nir_band_raster = (r"C:\B4.tif") #Calculating NDVI float raster ...
Basile's user avatar
  • 3,533
3 votes
2 answers
5k views

Adding two rasters using map algebra in ArcPy?

I want to simply add two rasters within a python script using map algebra, which from what I understand is the equivalent to adding two rasters in the raster calculator. If I do this using raster ...
Marina's user avatar
  • 192
1 vote
2 answers
109 views

Arcpy Map Algebra: Maximum Number of Nestings

When using Map Algebra you can nest multiple expressions as can be seen in the Esri example below. Is there a limit on how many long of a statement you can have OR a limit on how many Con statements ...
Rex's user avatar
  • 566
4 votes
1 answer
372 views

Passing additional arguments to ST_MapAlgebra callback?

I've written a custom callback function for ST_MapAlgebra and I want to pass additional arguments to it. The function is pretty useless - it just generates a raster filled with normal random values ...
nronnei's user avatar
  • 568
1 vote
1 answer
580 views

ArcGIS Raster Calculator Error 000539

I am getting the error-000539: Error running expression: rcexec(). I've seen that other people have this same issue but I am not sure how to fix mine. I just want to average the values of 10 rasters, ...
mlfp88's user avatar
  • 23
1 vote
1 answer
203 views

Error using random raster for raster calculations

I have created a random raster in ArcGIS Pro using the following Python command: arcpy.CreateRandomRaster_management(Path, "rnraster", "INTEGER", "", 10) Which works fine. Performing map algebra ...
Unencoded's user avatar
  • 225
1 vote
2 answers
73 views

How to set urban areas to NoData in a DTM?

In ArcGIS 10.1, I have a DTM and a polygon layer representing urban areas. For processing reasons, I want to exclude the urban areas from the DTM (i.e., setting urban areas to NoData). How can I ...
NewAtGis's user avatar
  • 1,536
5 votes
1 answer
484 views

Getting rid of small objects on raster in ArcMap?

What I want to do is to get rid of 'dark' objects which are on the green areas. My input looks like this: And I want my result to look like here: Raster value of green is 1, the rest has 0 value....
muszynov's user avatar
  • 647
1 vote
0 answers
90 views

Writing Raster Calculator Map Algebra expression?

I have the following map algebra expression to be used in Raster Calculator. The "Output raster" should satisfy the following conditions: If (IsUseAWSSites == True): if (InputRaster exists): ...
alextc's user avatar
  • 2,013
2 votes
1 answer
224 views

Checking if input raster exist or not in Raster Calculator?

I am with Raster Calculator in ModelBuilder on ArcGIS Desktop 10.2. In the Raster Calculator's Map Algebra expression window, I need to check if a Raster dataset has already existed or not. Can ...
alextc's user avatar
  • 2,013
2 votes
2 answers
349 views

Looping Map Algebra using Python

I am new to Python and am having difficulties trying to loop multiple rasters into a conditional statement. I want to extract all land-uses that have the value 21 from a folder with three different ...
belit1mw's user avatar
-1 votes
1 answer
269 views

Raster processing and query PostGIS [closed]

I have around 2000 raster file in TIFF format of 4.5Gb size. I want to store them in a PostGIS DB in order to do some mapalgebra operation between them and than query the results of the calculation ...
Lorenzo Bottaccioli's user avatar
1 vote
1 answer
69 views

ArcPy map algebra equivalent for "any"?

I have binary (0-1) rasters. I'm trying to do an operation equivalent to: z = arcpy.sa.Con((Raster(a) | Raster(b) | Raster(c) | ... | Raster(y)) where the raster files a-y are dynamically generated ...
triphook's user avatar
  • 427
2 votes
1 answer
1k views

PostGis's ST_MapAlgebra rasters do not have the same alignment

I'm having a problem with ST_MapAlgebra. An error stating The set of rasters provided (custom extent included, if appropriate) do not have the same alignment is shown. I've been trying to know where ...
David's user avatar
  • 21
0 votes
1 answer
84 views

Execute Equation in Map Algebra

I am in the process of shifting my raster calculations over from manually entering them into Raster Calculator to executing them in a Python script. I am curious if I can execute equations such as the ...
E. Weglarz's user avatar
1 vote
1 answer
615 views

Identifying row and column location of a raster image using ArcGIS 10.1

The solution already available online gives a python syntax error ERROR 000989 Python syntax error: Parsing error SyntaxError: invalid syntax (line 1) when I write $$rowmap + 1 in map ...
Ali's user avatar
  • 11
1 vote
2 answers
199 views

While loop in Map Algebra ArcPy, associate output raster name with input raster

I have an ArcMap document open with LandSat images from one day in different bands as rasters. They're named: LC80541162014003LGN00_B1.TIF LC80541162014003LGN00_B2.TIF and so on, B1 through to B9 (...
Beardsley's user avatar
  • 423
0 votes
2 answers
259 views

Raster multiplication script not executing

I built this code to multiply rasters but it will not execute, it gives me the following error: ERROR 000732: Input Raster: Dataset in_raster1 does not exist or is not supported # Import arcpy module ...
Alex's user avatar
  • 43
2 votes
1 answer
643 views

ArcGIS raster calculator: ERROR 000539: Error running expression: rcexec() <type 'exceptions.ImportError'>: No module named collections

My raster is in the GRID format, source type is continuous and pixel type is floating point (32bit). If i use the raster calculator ("dem" *1000 or "dem >= 2m" (to highlight certain heights) it ...
Jonnus90's user avatar
1 vote
1 answer
615 views

Raster result is different for arcpy.sa CON and arcpy.gp.Con_sa

I have to add two rasters, one bigger than the other, but before adding I have to set the value of NODATA of smaller raster to the value of bigger raster. So i used the following code to do it: ...
Henri Lim's user avatar
  • 149
2 votes
1 answer
277 views

Problem with algebra formulas for work with gdal_calc.py

I'm trying to update some values of a raster based on another raster. 1st raster (A): landuse data (values from 10 to 240) 2nd raster (B): mask data (only nodata values and a given value, for ...
kaycee's user avatar
  • 465
1 vote
1 answer
177 views

Map Algebra syntax

I'm trying to create a new raster from an existing slope raster where slopes are between 5 and 20 degrees. However, I'm receiving the error "ValueError: The truth value of a raster is ambiguous. ...
Andy Fisher's user avatar