Select to view content in your preferred language

Raster Sum

984
7
11-21-2013 06:58 AM
MatthewFriesen
Deactivated User
Hello. I am looking for a way to sum various raster layers together while keeping the full extent of the raster images used in the input. I have some smaller raster layers and some larger ones. When I use the raster calculator (after using a conditional statement: Con(IsNull(0, "Myraster") (I am using "Myraster" for some images that have different weights associated with them using float variables) I acheive only the extent of the smallest layer where the raster images overlap. It worked for me one time to achieve areas even where there is no overlap (ie: the full extent). I would like to know how this is accomplished. I have noticed you can copy the final images via raster copy and edit the snap and extent of the largest raster though I don't believe this worked for me. I did this and added the layers in the same way and it only showed the smallest extent. After trying a few other things it showed the larger extent. I am just not sure what changed. Thank you.

For the final output I would like to show layers that overlap both no times and multiple times and use colour symbology to describe this phenomena.
Matthew
0 Kudos
7 Replies
XanderBakker
Esri Esteemed Contributor
Hi Matthew,


Did you try using the setting "MAXOF" for Output Extent (Environment setting)?


The effect on the output extent will be:
The combined extent of all input data. All features or rasters will be processed.

Kind regards,

Xander
0 Kudos
MatthewFriesen
Deactivated User
Thank you Xander. Could this function be completed after the raster has been converted from a polygon? ie:
-take polygon feature > raster converter > "newRaster"
-copy raster function > input "newRaster" > environment settings > set extend to MAXOF
Or is this a setting that can be changed within the Raster Calculator?
It seems MAXOF would work, but when creating or copying rasters I believe only 1 raster is input at a time. This would lead me to believe that the maximum extent created by MAXOF would only apply to the single layer involved in the processing.
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Matthew,

You may want to look at this thread: http://forums.arcgis.com/threads/96534-Raster-Conversion-and-Density-Analysis
Shaun Walbridge has some useful suggestions to solve this. If this is what you want.

You are right that the MAXOF setting will only make sense when combining more than 1 raster. If you already know the final extent (of all rasters/polygons) you can set this extent in the environment settings. Alle rasters will be created for that extent and can be summed afterwards.

I can look into it next Monday, but have a look at the post by Shaun first.

Kind regards,

Xander
0 Kudos
SteveLynch
Esri Regular Contributor
use the Cellstatistics tool and set the extent to Union

-Steve
0 Kudos
XanderBakker
Esri Esteemed Contributor
use the Cellstatistics tool and set the extent to Union

-Steve


Use Cell Statistics only if the NoData cells have been changed to 0, since it will propagate NoData values from any input raster into the output raster. See "How Cell Statistics works".

Kind regards,

Xander
0 Kudos
SteveLynch
Esri Regular Contributor
Use Cell Statistics only if the NoData cells have been changed to 0, since it will propagate NoData values from any input raster into the output raster. See "How Cell Statistics works".

Kind regards,

Xander


Xander
Create a ConstantRaster (filled with 1's), then use the Shift tool (say shiftx, shifty=55) and create another raster.
Use CellStatistics (Overlay statistic=Sum), Extent=Union and the rest=default.

You'll notice that your output has 1's and 2's and, Nodata in areas where neither rasters have values.

Now if you uncheck Ignore Nodata on the Cellstats tool and do the above you'll only get 2's

-Steve
0 Kudos
XanderBakker
Esri Esteemed Contributor
Xander
Create a ConstantRaster (filled with 1's), then use the Shift tool (say shiftx, shifty=55) and create another raster.
Use CellStatistics (Overlay statistic=Sum), Extent=Union and the rest=default.

You'll notice that your output has 1's and 2's and, Nodata in areas where neither rasters have values.

Now if you uncheck Ignore Nodata on the Cellstats tool and do the above you'll only get 2's

-Steve


Hi Steve,

You're absolutely right. Thanks for pointing that out! (+1 for that).

Kind regards, Xander
0 Kudos