sfmeyer

Combine raster datasets from a workspace not by individual files. Suggestions Please?

Discussion created by sfmeyer on Jul 24, 2012
Latest reply on Aug 9, 2012 by sfmeyer
Thank you for any insight on this issue.

I have a semi-complicated model of python script tools and geoprocessing functions where I am trying to combine several raster datasets into one dataset. Seems easy enough? The issue is that I need to combine rasters from a workspace, not as indivual raster datasets. I potentially have 64 output raster datasets, of which any combination of 2 or all 64 may need to be combined.

This makes it impossible to hard line the raster datasets into some type of mosaic tool or spatial analyst math tool. The model cannot rely on any specific file to be there.

Currently, a boolean precondition is set to decide which of the rasters will be created, where they are then added to the model only Collect Values tool. This tool is exactly what I need because if the raster is created, it is in a workspace and if not, nothing is dependent on it. The only mosaic or combine type tool that I have had success with is creating a mosaic dataset and then adding the collection of rasters to the mosaic dataset. Unfortunately, I am not having success with the attribute table of the MD showing the values of each raster dataset specifically.

Preferably, I would like all raster datasets to be combined into one. I have exhausted what I believe are all of the tools to do this. Mosaic to New Raster should work but with the way my model is structured, I get errors on the number of bands between input and output rasters.

This is my million dollar question that I have not figured out, Does the Raster Calculator have a mechanism to merge or combine all rasters within a workspace? Such as, instead of Merge (Raster 1, Raster 2, Raster 3, etc) can it look to the Collect Value tool in the model with an expression similar to Merge (CollectedValues)?

I know this was a long post, but any insight is appreciated! INCLUDING ALTERNATIVES.
I have searched and tried but have just not come up with an answer yet. THANK YOU!

Outcomes