Based on what rule does Raster Calculator produce output when the input rasters are misaligned?

05-01-2018 12:59 PM
New Contributor

Hello everyone,

I'm using ArcMap 10.2.2. Taking into account the following assumptions:

we have 2 rasters (satellite images from different satellite platforms) of the same pixel size, same coordinate system, little bit misaligned, Snap to Raster environment variable is not defined

I apply a map algebra operation on them. Let's say I add them (, raster2)).

The question is: based on what rule does the Raster Calculator algorithms choose which of the two input rasters the output raster will be aligned to.


Inputs: Raster1, Raster2

Map Algebra Operation: Raster1 + Raster2

Output: Result (aligned to Raster1)

Question: Why Result is aligned to Raster1 instead of Raster2, since I have not defined Snap to Raster environment variable?

The search I did in order to try to find an answer to that is based on ArcGIS online documentation, help tools inside ArcGIS desktop environment, gis.stackexchange, esri forum, as well as python files. In the latter case, I ended up dealing with built-in functions that are included in arcgisscripting.pyd where I don't have access.

I hope I stated the question clearly. Thank you

3 Replies
MVP Esteemed Contributor

first in sets the rules... well sometimes... depends on who is supervising

Some rules try to be nice, like taking the average of the inputs, so no one wins since that should never be a decision, but it gets the job done and some people wouldn't notice.

If in doubt, take a procedure where you know there is a difference in the inputs and reverse the order.  Examine the environment settings used and do a comparison.

New Contributor

Thank you for your answer Dan. Unfortunately -in my case at least- it doesn't have to do with the rasters' order. Anyway, this was a question out of curiosity just to know how everything works.

0 Kudos
MVP Esteemed Contributor

What happens here totally depends on the current extent environment settings and the tool defaults. If the snap isn't set, no snapping takes place. 

The extent setting (if not set) will be (by default, for Raster Calculator) the union of inputs ("MAXOF"), so the lower left corner of the Raster Calculator output will be placed at the minimum x and y of all the inputs. If the extent is not set, this effectively makes the snap raster the one with the minimum x and y coordinates of those included as input to Raster Calculator. You'll get different results if the extent setting is Intersection of Inputs ("MINOF") or if it is explicitly set in the environment (for example - same as display).

0 Kudos