Raster Calculator Merge Function in ArcGIS 10?

23515
12
04-14-2011 12:44 PM
MichaelDulin
New Contributor II
I'm trying to merge DEM grids using raster calculator.
Is there a command to merge rasters using raster calculator in ArcGIS 10? In 9.3 the command worked like this: Merge ([dem1], [dem2], [dem3])

That command doesn't seem to work since the switch to python script.....

Thanks for any advice.
12 Replies
JohnChurchill
New Contributor III
I miss this function as well. While going through and updating old Python scripts I wrote for 9.3.1, I wondered what happened to this (which landed me here). I suppose I will have to use the Mosaic mentioned above instead. Bummer. I also miss having functionality right in the Spatial Analyst toolbar when working within ArcMap. Now I have to go into the toolbox just to use the raster calculator.
0 Kudos
curtvprice
MVP Esteemed Contributor
. I also miss having functionality right in the Spatial Analyst toolbar when working within ArcMap. Now I have to go into the toolbox just to use the raster calculator.


I certainly do not miss having four different map algebra environments, each with its own architecture and quirks:

Arc 9x Map Algebra Parser: Historical source
Raster Calculator: ArcGIS 8x / ArcView 3x "raster engine" (note, does not honor GP environment!)
Single-Output Map Algebra: ArcGIS 9x
Multi-Output Map Algebra: ArcInfo Workstation "grid engine" (only reads grids)
Tool interface: ArcToolbox

In 10.x only one Python Map Algebra syntax and toolset is used, regardless of interface (python, modelbuilder, tool, Raster Calculator Tool), and honors the same geoprocessing environment as all other non-Spatial Analyst ArcGIS tools. Not to mention it directly reads and writes non-grid raster formats!

I recommend trying the python command window with its intellisense if you do a lot of interactive raster processing. Change is a hassle, I agree, but I believe you'll eventually really like it.

I suppose I will have to use the Mosaic mentioned above instead


The Mosaic tool is tricky because you need to create an empty raster and mosaic into it. I highly recommend setting the bit depth explicitly to avoid issue with NoData. (I usually set it to 32-bit signed if the input is a grid, just to make sure the NoData stays that way.) Mosaic To New Raster is okay, but I've found the Mosaic tool slight more robust because of the bit depth issue.

As mentioned above, another possible replacement in your workflow (if you don't need Mosaic's nifty edge-merging in overlap areas)  is the Cell Statistics tool, which does a cell by cell statistical merge and has the (neat) option to ignore NoData cells.
0 Kudos
MichaelSchwartz
New Contributor II
I have found that for rasters that are 1/0 or 1/NoData you can use Cell Statistics �?? Max and make sure the �??Ignore NoData�?� box is checked.  Works like a charm!
0 Kudos