Merging Rasters with Unique Values

1195
7
03-23-2022 11:36 AM
mafatu
by
New Contributor II

Hi everyone,

I have 5 rasters with value and count columns in their attribute tables (Image 1). I want to merge these 5 rasters while keeping these numbers in the attribute tables. The final raster should have 5 values from 1 to 5 and their corresponding count values. I checked the community and find answers from back in 2013 but it did not work for me. Do you have any suggestions?

Thanks!

Geologist
0 Kudos
7 Replies
SteveLynch
Esri Regular Contributor

look at Combine

mafatu
by
New Contributor II

Thanks for the reply but it did not work for me. I need to combine with raster while keeping their attributes. Please check the attached image. Each colour belongs to a different raster file. I want to merge them and have one raster while keeping their value and count numbers.

Geologist
0 Kudos
by Anonymous User
Not applicable

Perhaps the Composite Bands tool?

Not sure how the output treats attribute data though. You might have to rebuild the attribute table after compositing.

mafatu
by
New Contributor II

Thanks but it did not work either, just tried that.

Geologist
0 Kudos
DanPatterson
MVP Esteemed Contributor

You don't indicate whether the rasters overlap one another or are adjacent to one another, and your image doesn't clarify this

@SteveLynch 's suggestion of using Combine should work. 

If the rasters overlap partially or completely, you will get a new class which is the unique combinations of the input rasters.  The original data for each raster is retained and can be summarized to get the original counts.

If the rasters are adjacent and don't overlap, you will just retain the values of the input rasters.  You just need to set the analysis extent to encompass the full extent of the rasters.

 


... sort of retired...
0 Kudos
mafatu
by
New Contributor II

Hi Dan,

Sorry for not sharing the details. Rasters don't overlap but some of them are adjacent to each other and some are not. Please check the attached image for a full view of the extent. Each colour represents a different risk class and came from a different raster file. I would like to merge and keep their risk classes. I tried to combine tool one more but it did not work. Do you have any other suggestions?

I'm thinking to convert all raster to polygon and then combine?

Thanks!

Geologist
0 Kudos
DanPatterson
MVP Esteemed Contributor

What are the risk classes? and are they the same from raster to raster?

What does the table look like?


... sort of retired...
0 Kudos