I have many hundreds of GeoTiff files to mosaic. The problem is that they are stored in a sub-directory structure whereby I need to traverse down into each sub-directory, mosaic all rasters in that location, and then go back up and down into all the other sub-directories sequentially to perform the same action. Some example directories would appear as follows:
c:\dem\250k\001 (do all rasters here)
............. \002 (do all rasters here)
............. \003 (do all rasters here)
I found the following Python snippet on the forum, but it finds and mosaics all rasters in all sub-directories to a single output layer. I need to find a way to "walk" into the sub-directories and output a single output for each. Thanks.
workspace = r"c:\dem\250k"
rasters = 
walk = arcpy.da.Walk(workspace, topdown=True, datatype="RasterDataset")
for dirpath, dirnames, filenames in walk:
for filename in filenames:
ras_list = ";".join(rasters)
"test.tif", "", "16_BIT_SIGNED", "", "1", "LAST")
# return SA license