Combine more than 20 rasters

4790
6
03-23-2015 08:07 AM
MatthewRice
New Contributor II

I am looking to combine more than 20 rasters while keeping the unique value for each, I reclassified no data to 1 and gave each raster a unique value so I can later call upon it in a python script. Combine only works with up to 20 rasters, how can I combine my 38 while keeping the attribute table for each complete?

Tags (3)
6 Replies
JeffersonFerreira_Ferreira
New Contributor III

Hi Matthew . Have you solved this question? I'm exactly looking for this answer. If you already have a solution, please share it here with us. Best regards

0 Kudos
DanPatterson_Retired
MVP Emeritus

Combine them in groups and keep track of the resultant between steps

0 Kudos
JeffersonFerreira_Ferreira
New Contributor III

Dear Dan. Thanks for your reply. But as much as I can figure out, It's not possible to combine two partial results and get the same result as we could get combining the whole dataset.

Let's follow. I have 31 binary rasters (below) representing the annual occurrence of an given phenomenon. The pixels with value=1984 are the ones as "occurred" in 1984. In the raster "yr1985", the value=1985 represent the occurrence in the year 1985 and so on.

When we combine, let's say, 15 rasters the result is (below) an assigned unique value for each unique combination of occurrences. So the pixels OID=0 represent an unique combination of 401 pixels (count field) to which was assigned the arbitrary value=1. And the attribute table shows this combination as one field per input raster.

If I combine this results with another partial result I'm losing this attribute table and the resulting combination of pixels. I don't know if I must do another middle-step processing or what to keep the same unique value and resulting table as if I had done a combination of 31 rasters.

Any idea?

Thanks.

0 Kudos
DanPatterson_Retired
MVP Emeritus

you combine a block of files, then combine that block with other files...you don't combine blocks separately then try to piece them together, because the values are determined by the first cell combinations found, which will be different for each combination of rasters.

Not good

combine ( a,b)  combine(c,d)  then try to piece together in chunks

try

x = combine(a,b)

Y = combine(x,c,d)

z = combine(y,etc,etc)

0 Kudos
DanPatterson_Retired
MVP Emeritus

​I would be more than inclined to do a raster Plus and add them all together, then decide which threshold to examine in combinations.  consider these possible temporal sequences from earliest to latest

1 0 1 0 1 0 1 0 1 0

1 1 1 1 1 0 0 0 0 0

0 0 0 0 0 1 1 1 1 1

0 1 0 1 0 1 0 1 0 1

If one did sequential additions from the start and plotted the results different patterns would observed and give you thought as to where to go.  consider the above with 5 year moving or block sums (doing mental math here...so bear with me)

moving sums x for cell impacted by edge affects

x x 3 2 2 2 3 2 x x

x x 5 4 3 2 1 0 x x

x x 0 1 2 3 4 5 x x

x x 2 3 2 2 2 3 x x

now the 1st and last may be a bit confusing so I would just do another moving average to see if any pattern emerged...(maybe case 1 goes to all 1s etc)

the 2nd and 3 show inverted patterns over the shortish term but would reveal a common value for the 10 year block sum

I prefer looking a some combination of moving and block "statistics" whether that be sums, averages, ranges, etc etc, than wonking together 40 year as one big combination and trying to figure what is going on.  Food for thought in any event.

Cheers

0 Kudos
RajinderNagi
Esri Contributor

Are there any overlaps in your rasters?

You can put them all in a mosaic dataset and can use Attribute Table function—Help | ArcGIS for Desktop on mosaic dataset. You can create the attribute table as a dbf file for each unique raster.

0 Kudos