Solved! Go to Solution.
Is this also the solution for a simple combine with rasters with descriptive attributes? ... Combining the rasters takes about 2 minutes.
Having the ability to use attributes in Raster Calculator would be really nice, why was it taken away?
The Lookup function is the new way to do it. The redesign of the Raster Calculator tool at 10.x was a retooling that allowed a single syntax (arcpy map algebra) to work across ArcGIS. At 9.x, we had SOMA, MOMA, Raster Calculator, the command line, and tool interface. Each of these had a different syntax (for example, SOMA did not support "dot" syntax), and Raster Calculator even had its own unique geoprocessing environment(!). So going forward I think it is an improvement, although there is a learning curve.
the merge function was really nice too, why was it disappeared?)
The Merge and Mosaic tools were combined. In some situations, I have found Cell Statistics useful to merge datasets together.
I need to [mosaic] 11 GRIDs which presumably do not overlap, but might a little around the edges as as artifact of how they were created. Mosaic does not let me use an item either. Two text items have to be used for the desisred attributes in the GRIDs. So I've concatenated the two fields into a new field, then added added a new field for an integer crosswalk of the concatenated fields. I plan to mosaic the GRIDs after adding & calculating the two new fields in all of them, thne using the "lookup" function to create new grids with value = newfield, hten mosaic. What a lot of work. Is there an easier way ?
If your raster codes are not unique (ie value 2 means different things for two of your 11 rasters) you do have a sticky processing problem.
The best way I can think is to convert your 11 rasters so all cells are unique across the 11 rasters and mosaic them, then join your attributes back in.
Step 1. Set up your value in each VAT
NEWVAL = [VALUE] + 1000
Step 2. Copy all your raster attribute tables to standalone tables (you could use Copy Rows in a iterator model), and join them all together with the Merge tool.
Step 3. Convert your rasters to these values and mosaic them:
ras1 = "grid1" + 1000 ras2 = "grid2" + 2000
Mosaic To New Raster to merge ras1-ras11
Step 4. Join Field your new mosaicked raster's RAT to the table created in step 2.
An entirely different approach that may work is this. May be easiest in the Python window:
1. Set the extent to cover all 11 rasters
2. For all 11 rasters, over the entire extent, convert nodata to a missing value (say, zero):
x1 = Con(IsNull("grid1"),0,"grid1") x2 = Con(IsNull("grid2"),0,"grid1") ...
3. Combine these together. You'll get a pretty wide RAT with 11 fields that match VALUE in your 11 raster tables included.
Combine(x1,x2... x11)
4. Add your text fields to this combined raster.
5. One by one, select for each of your fields ("RAS11" <> 0), add join and calc over your text fields, remove join.
Hope this helps!
Is this also the solution for a simple combine with rasters with descriptive attributes? ... Combining the rasters takes about 2 minutes.
Hey Diane, check out this document I just posted this weekend: