I have 380 DEMs. All the rasters are in .tif format. I am trying to mosaic them together. But the issue is that every raster image is in a separate folder. There are 380 folders for the 380 different rasters. I have tried creating a file geodatabase, adding a raster catalog and then adding the DEMs to the catalog. But it did not work.
I have also tried creating an empty mosaic dataset and adding rasters to it.
The issue basically is that every raster is in a separate folder and mosaicking them individually is not a feasible option.
Kindly suggest a solution!
dem mosaic raster mosaic dataset
Creating a mosaic dataset—Help | ArcGIS for Desktop
- The Include Sub Folders check box should be checked. This option will recursively explore any subfolders containing the data being added.
Thank you for your reply.
But we had already checked the sub-folder option while adding rasters to the mosaic dataset. Just for your convenience the folder structure that we have right now is:
Like this we have four main folders and approximately 50-60 sub-folders within each main folder and every sub-folder has one raster each. So how do we iterate between these folders?
Have you tried Adding raster data to a mosaic dataset—Help | ArcGIS for Desktop with the "Workspace" option?
I tried it three different ways (with 3-main, 2ith 2 subfolders unders each, with on raster.
All three of these had the same result, so I think if all your "Main Folder X" folders are in a separate "top folder" you should be able to run this command once. I've done a similar process with about 56k raster,
Copy of the python snippet.......most are the default options....I only entered the info in the above window.
arcpy.AddRastersToMosaicDataset_management(in_mosaic_dataset="C:/__temp/_test.gdb/test3", raster_type="Raster Dataset", input_path="C:\__teemp", update_cellsize_ranges="UPDATE_CELL_SIZES", update_boundary="UPDATE_BOUNDARY", update_overviews="NO_OVERVIEWS", maximum_pyramid_levels="", maximum_cell_size="0", minimum_dimension="1500", spatial_reference="", filter="#", sub_folder="SUBFOLDERS", duplicate_items_action="ALLOW_DUPLICATES", build_pyramids="NO_PYRAMIDS", calculate_statistics="NO_STATISTICS", build_thumbnails="NO_THUMBNAILS", operation_description="#", force_spatial_reference="NO_FORCE_SPATIAL_REFERENCE")