Add (SUM) Multiple Rasters of different extents

19898
15
02-15-2011 10:31 AM
MichaelMarkieta
New Contributor III
I am having trouble adding multiple rasters to create an overal classifications raster.

Currently, I have 3 criteria variables (polygons), which have been converted from vector to raster. Each raster represents a different extent of spatial coverage on my map (eg, highways, land usage, pop density by Census Tract... I am creating a human influence index)

I will use a simplified grid example, such as those used in the ArcMap help/resources.

Below you will see the addition (summation) of 3 raster grids, with the output that I am currently experiencing. This is NOT what I would like. (grey = nodata)



Here is an example of what I would like to happen.



I've spent too much time trying to figure this out. I hope someone can steer me to the right tool or option/setting?

Note: I am using ArcMap 10
0 Kudos
15 Replies
PatrickTaurman
Occasional Contributor III
What you could do is use a con(isnull([raster]), 0, [raster]) statement in the Raster Calculator which will change all your NoData pixels to 0 allowing the rasters to be added together. That's assuming you don't have 0 as a pixel value. 

If you do have 0 as a valid pixel value, add 1 to each raster using the Plus tool, run the Con(isnull) statement (to change NoData to zero), add them all together, reclassify so that anything marked 0 is NoData, and then subtract 3.
0 Kudos
MichaelMarkieta
New Contributor III
I may have asked the question poorly by using the wrong terms and explanation. This is the first time I have had to ask for help so please bear with me. I am usually not this needy...

I think I may have misinterpreted NODATA for "not a part of the raster". But in fact, nodata means there is a cell which is part of that raster grid, but it has nodata associated with it.

Hopefully this makes more sense...



What you can picture this as is two polygon shape files that have been converted to raster. One raster represents population density (values=4, 7, 10) and the other represents a highway (value=10). The rasters have cells which coincide in space, as well as cells that do not coincide. I would like to create a new raster that has a summation of values for each cell, whether or not every raster has data for every particular cell.

As you can see, the data from the rasters where the cells do not "overlay" each other is tossed from the calculation.

How can I work around this?

To get this:

0 Kudos
MichaelMarkieta
New Contributor III
I think I may have found the right tool within spatial analyst.

By utilizing Cell Statistics with the ignore NoData box CHECKED, I am able to "SUM" and produce a new raster with what I believe I can use for my "Human Influence Index" (human footprint).

If there is a better way to go about this, please let me know. Thank you for your attention voldune.
ChristofJörg
New Contributor

This was exactly what I was looking for, thank you so much!

0 Kudos
davidquiros
New Contributor
I have been searching for hours how to solve this same problem.  I found some tutorials online that seem to work, but not for ArcGIS 10.

I've tried using mosaics, the raster calculator, clipping, etc.  I just tried cells statistics, and it seems that the ignore no data needs to be UNCHECKED.  However, the result is still the same as when I use the raster calculator.

If the spatial extent of ALL/BOTH raster files do not span the distance, the program still takes the intersection, not the union, of the raster files.

Anybody have any advice?
0 Kudos
profchamberlain
New Contributor
I also need to mosaic multiple rasters together, by summing the values when more than one raster has a value for a given location. I searched various options online, however, I am not able to find something that works for my situation.

Here is what I am dealing with:

[ATTACH=CONFIG]12156[/ATTACH]

In this image, each blue box represents a different floating point raster. I need to mosaic all rasters into a single result, where the overlapping areas are summed values. Normally, it would be easy to modify the files to ensure that all the extents are the same, then convert NoData to zero, and Add.

There are two problems with this:

  1. given the extent and resolution, each raster would need to be roughly 50GB in size (sure I could compress but it won't save that much).

  2. I have about 500 rasters


Did any of you manage to find a solution?

Thanks for the help!
0 Kudos
deleted-user-IR249IovB3CN
New Contributor III
Has anyone solved this? It appears to have been a long running problem with no solid solution.
0 Kudos
profchamberlain
New Contributor
I have been working with ESRI on a fix for sometime, and it appears that they have found a solution. The fix is to use Cell Statistics, ensuring that NoData is not considered in the calculation. As many people may have discovered, Cell Statistics really only creates a pseudo-intersection of values. In order to correct the problem, one needs to create a raster with the value of zero, which embodies the full spatial extent of all rasters for which the "merging" needs to happen. Then, that raster, and all others need to be included in the Cell Statistics tool, using the option Sum values.

It does work, but it can also be quite slow depending upon size. If others have similar problems and find that this solves the problem, please report your successes/issues here, so we can all benefit!
0 Kudos
SteveLynch
Esri Regular Contributor
Brent

Are you talking about the enhancement that went into ArcGIS10 which was released in 2011?

See
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Cell_Statistics/009z0000007q000000/

-Steve