Sum raster files from output of an iterator

1328
8
03-05-2017 12:00 PM
CristinaCatita
New Contributor II

Hi I need some help with iterators in Model Builder.

I have 2 buffer zones of each segment of a line. From those buffers, I need to convert them to raster grid and then sum both grids, with an extent equivalent to the union of both rasters.

I tryed to create a model as in attach, which produce both rasters. But since I am not able to distinguish the raster file names (output of iterator), I am not able to select them for cell statistics or raster calculator. I don't know how can i sum  both rasters in each iteration:

Thanks for your help.

Cristina

0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus

Plus would solve the addition issue, but I suspect not your name issue

0 Kudos
CristinaCatita
New Contributor II

I tried to use the Collect Values in order to create a list with my both raster names... but since they are an output of an iterator process... each time the process runs the list increases and the final sum, computes the sum of all the rasters in the list and not only both rasters that I want!!! 

0 Kudos
AbdullahAnter
Occasional Contributor III

Sum raster or merge raster in one raster?

0 Kudos
CristinaCatita
New Contributor II

I really want to sum both rasters. But the problem is related with the fact that i am not able to select the rasters by their exact names, because they are an output of an iterator process. Maybe there is an easier way to do this operation!!!

0 Kudos
DanPatterson_Retired
MVP Emeritus

Yes that will be a problem if you are collecting all the raster into a list.  It sounds like you want to iterate by pairs and two iterators aren't currently allowed in modelbuilder.  scripting this would be easier.

AbdullahAnter
Occasional Contributor III

Do you want to sum each two raster for each line and extract to multi raster/or do you want to extract all sum raster in one raster?

if second one , maybe you will not need to use iterator.

0 Kudos
ChrisDonohue__GISP
MVP Alum

I'm not sure if this will lead to a solution for your issue, but here's a similar issue that comes up in Modelbuilder and how to resolve it.

Incomplete Derived Data:  ArcGIS Help (10.2, 10.2.1, and 10.2.2) 

Chris Donohue, GISP

0 Kudos
CristinaCatita
New Contributor II

Thanks for all help.

I already solved the problem!

I used "Get Field Value" to save each line ID, used in iteration. This value was used later, in the expression of "Select Layer By attributes" performed on both buffers to select only the buffers of interest. After that, both selected buffers were converted to raster and Cell Statistics was performed to sum both rasters!

It works!