1
vote
1answer
24 views

QGIS raster calculator using abs() function

Is it possible to use the Abs() function in the raster calculator in QGIS? I've tried it, but it didn't work.
2
votes
1answer
50 views

Map algebra from files in multiple directories

I'm a rookie in python programming. I want to do map algebra for multiple rasters but these rasters are in different folders. Here's the code ive created so far: #Importing modules import arcpy from ...
7
votes
2answers
88 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 ...
2
votes
1answer
53 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 ...
0
votes
1answer
68 views

Cause of ArcGIS Raster Calculator Parsing error <type 'exceptions.SyntaxError'>: invalid syntax?

This is my first attempt at much code in the raster calculator of ArcMap 10.0, but I think I'm close. I have nine rasters (A-I below) and want a new raster with value = 1 where any of the rasters ...
0
votes
1answer
123 views

How to compare two rasters and reclass the greater value(python script)?

I am working on an assignment that requires us to reclass a raster(via python) from two rasters. We need to compare the power received at one cell(on raster1) and compare it to the same cell on raster ...
0
votes
0answers
193 views

Help with scripts for processing raster files with the raster calculator in QGIS

I am trying to process some raster files using python scripts in Qgis 2.20, and I have been having trouble finding any documentation on using raster calculator in scripts being run in the processing ...
1
vote
2answers
624 views

Create an X,Y latitude and longitude grid from an raster

I have a satellite image (LandSat 5), I want create a raster with X,Y coordinates, this is possible in Model Builder of ArcGis 10.0? or other option. I know that the option $$YMAP ($$XMAP) not work ...
4
votes
2answers
274 views

Using Python and open source modules, how can I perform Raster Calculator functions?

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 Arcpy module. I have the osgeo ...
0
votes
1answer
55 views

Setting up Raster Calculater for QGIS Python Console: ImportError?

I'm trying to follow the instructions here How to evaluate raster calculator expressions from the console? to set up the python console to to use the raster calculator. I tried: from qgis.analysis ...
1
vote
1answer
59 views

How to select pixel with smallest number in stack raster using Python script in ArcGIS for Desktop?

I have 6 tiff file in ArcGIS which are identical in term of geometry (same frame, same number of row and column). The pixel value of each tiff file is integer and range from 1 to 4. So if I overlay ...
-1
votes
1answer
187 views

Raster produced by Con expression not saving

I cannot get a Con expression to work. Or, if it is working, I cannot get the raster produced by the Con expression to save. I have two rasters and I want the positive difference between the two, and ...
0
votes
0answers
71 views

Maintain 8-bit pixel depth in Raster Calculator [duplicate]

Would anyone know how to maintain 8-bit pixels when computing raster calculations in ArcMap? This is part of a model so I need to keep the image with the original 8 bit, do the calculations, convert ...
1
vote
1answer
849 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", ...
8
votes
1answer
1k views

How to make a new raster using con() script in Python?

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

How do I make a path cross the most possible classes in a raster?

I want to create a function and possibly use Arcmap tools to create something similar to Cost Path. Instead of just choosing the LCP, it must cross through the most different integers. Let's say I ...
5
votes
1answer
612 views

Raster processing with Python or Arc raster calculator

I have 4-band NAIP imagery that require the following processing steps: Convert to 8 bit unsigned B/W Reverse (note not inverse) the image, so that dark values appear light and light values appear ...