0

I have 17 rasters, some of which overlap one another. I wish to combine them such that where the rasters overlap the sum of their values is taken. I have tried combining them using raster calculator, simply using

raster1 + raster2 + ...

However this results in the error

"ERROR 010422: Error in porcessing the environment mask."

I have looked into this; http://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/010001-020000/tool-errors-and-warnings-10401-10425-010422.htm

and

http://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/mask.htm

All my data are in rasters and such should already have a mask enivronment as I understand it, with "NoData" being output where present.

What is the error in my approach?

  • Does it work with only two rasters as input? – phloem Nov 14 '16 at 22:47
  • Instead of using raster calculator, try "Mosaic to New Raster" and set the Mosaic Operator to sum. Then simply clip the output raster to whatever mask you desire if needed. – timpjohns Nov 21 '16 at 14:33
2
+50

Before doing anything you must set Environments-Processing Extent equal to extent of the union of all rasters. The simplest way to do so is creating new mosaic dataset and adding all of you rasters to it. You can safely delete this dataset later. Do it from new mxd.

Now you can find totals. The best way to do so is cell statistics tool:

arcpy.gp.CellStatistics_sa("RASTER0;RASTER1;RASTER2", "D:/Scratch/sumTHEM", "SUM", "DATA")

I don’t have overlapping rasters handy, so I created flat raster equal 1 and split it using Split Raster tool, using 3 overlapping polygons:

Input

I added 3 rasters to new mosaic dataset, set environments and applied cell statistics as mentioned.

OUTPUT shows Shaded Relief of totals and long section:

Result

This method is an overkill, perhaps test cell statistics (SUM) first with Environments extent set to Union of inputs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.