I am unsure how to go about doing this using Python in ArcMap, though I know how to do it by hand. I have geodatabases containing gSSURGO data, one for each state, in their own folders. I have a table that has national datasets of weighted average attributes (found here: https://geonet.esri.com/docs/DOC-2336?sr=stream&ru=9646) that can be joined to the raster layer in the GDB containing the state's gSSURGO data.
Is there a way to batch process this, so that I can create new rasters from joining the raster layer in each states GDB to the national level weighted average data?
It seems it would entail (here follows poor pseudocode):
Open up the national level table For each folder in the Main Folder (containing the states folders) Open up each GDB Open up the raster file Join the raster file to the national level file based on the one common field Create a new raster based on the join Merge all rasters into a national raster
I need to end up with a national level raster having merged all these individually joined state raster layers.
I would start with this part of your pseudo code:
Open up each GDB Open up the raster file Join the raster file to the national level file based on the one common field Create a new raster based on the join
and, assuming that you are running a Geoprocessing tool for each of those steps, do this once from their tool dialogs and then use Copy As Python Snippet from the Geoprocessing | Results window to copy/paste the four snippets of Python code into an empty Python script.
Once you have those four steps automated in ArcPy you will be in a good position to put it into a
for loop and work on any remaining steps.