Mosaic raster datasets to a geodatabase raster dataset


PurposeThis sample demonstrates the recommended approach to create a raster mosaic in a geodatabase (file geodatabase or ArcSDE geodatabase) from rasters in a folder using geoprocessing tool classes. The task involves two steps—create an empty raster dataset and mosaic rasters in a folder (optionally subfolders) to the new raster dataset.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open the CreateRasterMosaic solution file.
  2. Review the source code and make any changes to the data location and loading options.
  3. Compile and run.
  4. Check the output geodatabase raster dataset. It should be a mosaic of all the raster datasets in the input folder.

CreateRasterMosaic.cs Source code for creating raster dataset and mosaicking.
Download the C# files
CreateRasterMosaic.vb Source code for creating raster dataset and mosaicking.
Download the VB.NET files

Download the files for all languages

See Also:

Sample: Mosaic raster datasets to a file raster format




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced
Engine Developer Kit Engine