Simple Raster Addition?

908
7
08-26-2013 04:43 PM
DinahOliver
New Contributor
Hi,

I have quite a few rasters that have values of 0 (not suitable) and 1(suitable).  I'm trying to combine them all and have the '1's combined into one raster so I can see all of my suitable areas.  Any tips on how to do this? I've tried various ways in raster calculator but no luck.

Thank you,
Dee
0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus
what version of arcmap?  Are you using tools in ArcToolbox? using the Plus tool? Have you set your analysis extents?  Are all rasters of the same extent? Details please
0 Kudos
larryzhang1
New Contributor III
...

have quite a few rasters that have values of 0 (not suitable) and 1(suitable).  I'm trying to combine them all and have the '1's combined into one raster so I can see all of my suitable areas.  ..


Dee


Dinah,

Not bad idea to try the following quick steps:

1. To combine all raster images (containing 1 & 0) into one raster (0 & 1), firstly to create and add all rasters (�??1�?? & �??0�??) into MD; and then change �??Default Mosaic Operator�??=�??Mean�?? under Mosaic Dataset Properties (so, the key is to take advantage of the MD model);

2. Extract �??1�?? using �??Mask�?? function from the above merged raster in MD to get masked raster via �??Function Chain�?? from �??Image Analysis�??, which only has the value �??1�??; (by now, the result mostly meets your need. If not, go to the next);

3. Export the above-masked �??1�?? raster into vector for post-processing, if needed.
0 Kudos
EricRice
Esri Regular Contributor
The key information missing is... Is this a stack of raster datasets (same extents/resolution), or a series of adjacent raster datasets that need to be turned into a mosaic of the series?

Best,
Eric
0 Kudos
larryzhang1
New Contributor III
... Is this a stack of raster datasets (same extents/resolution), or a series of adjacent raster datasets that need to be turned into a mosaic of the series?

Eric


Hi, Eric,

The questions that you elevated really give me an opportunity to learn MD. And also would like to hear the details, why so critical in MD, if those �??discrete raster (0, 1)�?? extents or resolutions are different?

Regards,

Larry @ Aramco


++++++++++
PS,

The following two are raised for consideration�?�

Firstly, the question is �??inherently�?? referred to the operation �??Mosaic�??, rather than �??Composite�??, no matter stack or adjacent. Isn�??t it?   �?�


[INDENT](Inversely, let�??s assume that those are a stack of raster, when we composite all �??discrete raster data�?? into multi-band raster, the user�??s target will become more time-consuming to solve it. �?�)[/INDENT]


Secondly, no matter which one (same resolution or not), I believe that MD should work well in order to merge (mosaic) those �??discrete raster (0, 1)�?? into one discrete raster. Generally speaking, the potential issue could be with the operator �??Mean�??, if so.  However, to this 'discrete data' case, the 'Mean' algorithm in MD would work, without big issue. 


[INDENT](In fact, if those are continuous raster, the operator �??Mean�?? or �??Featuring�?? in ArcGIS might be not good, which was discussed last year at http://forums.arcgis.com/threads/71343-From-imagery-processing-perspective-the-mosaic-dataset-model-... ).[/INDENT]
0 Kudos
EricRice
Esri Regular Contributor
Larry,

The title of the thread is "Simple Raster Addition" which led me to conclude that the user posting has a stack of suitability layers that need to be "combined" together.  Adding them together - extent and resolution come into play.  I would argue that simply adding suitability stacks together isn't necessarily a great approach.  Often, if any suitability in the stack of pixels is unsuitable, then the entire stack is unsuitable.  There are many approaches one could take though and their approach of adding them together indicates the opposite of what I'm saying.  This user hasn't clarified what they really want for output.  The user should look into the Cell Statistics tool.  Now if they have adjacent suitability rasters, sure load them into a MD and be done with it.  Set your settings for areas of overlap (probably min or max in the 0,1 case).  Or even in the case of a stack of binary suitability layers, you can load them into the MD and use the Local Function - Cell Statistics to work out the same as what the GP tool would give you except on the fly.


Best,
Eric
0 Kudos
larryzhang1
New Contributor III
Thx, Eric,

Yes, agree with you on the thread �??title�?? unclear with the question�?�

Anyhow, you are right on the operator �??Max�??, which may be suitable for this case (only �??1�??).

Regards,

Larry

+++++++++++++++++
By the way, for last three-year advances on MD model, customers get many benefits from it, in operation. However, with huge VHR imagery available, more and more applications/users highly demand advanced and high-level algorithms for information extraction from raster (in particular, continuous raster) within MD, including post-processing (generalization, cleanup�?�), to update GIS database. Hope that ESRI raster team is working on and implement more good algorithms to help us by the next release �?�
(On this, see the ENVI reference at http://www.exelisvis.com/docs/Rule_Based_Classification.html )
0 Kudos
Bradvan_Bakel
New Contributor II
I did this just today.
Assuming you only want the areas where ALL the suitable layers are present, set NoData to have no value, then just use raster calculator and put "layer1"+"layer2"+"layer3" and so on for all the layers. Then reclassify if you need to
0 Kudos