Summary
Create an empty mosaic dataset in a geodatabase.
Usage
The mosaic dataset must be created in a geodatabase.
Once the mosaic dataset is created, you can use the Add Rasters to Mosaic Dataset tool to populate it with rasters.
The name of the mosaic dataset must keep within the limits of the geodatabase or underlying database. For example, the name cannot start with a number.
Syntax
CreateMosaicDataset_management (in_workspace, in_mosaicdataset_name, coordinate_system, {num_bands}, {pixel_type}, {product_definition}, {product_band_definitions})
Parameter | Explanation | Data Type |
in_workspace | The path to the geodatabase. | Workspace |
in_mosaicdataset_name | Name the mosaic dataset you are creating. | String |
coordinate_system | The coordinate system for all of the items in the mosaic dataset. | Spatial Reference |
num_bands (Optional) | The number of bands that the raster datasets in the mosaic dataset will have. | Long |
pixel_type (Optional) | Set the bit depth, or radiometric resolution, of the mosaic dataset. If not defined, it will be taken from the first raster dataset.
| String |
product_definition (Optional) | Select a template that is either specific to the type of imagery you are working with, or is generic. The generic options are as follows:
| String |
product_band_definitions [Band Name {Wavelength Minimum} {Wavelength Maximum},...] (Optional) | Edit the product_definition by adjusting the wavelength ranges, changing the band order, and adding new bands when using the CUSTOM product definition. | Value Table |
Code sample
CreateMosaicDataset example 1 (Python window)
This is a Python sample for CreateMosaicDataset.
import arcpy
arcpy.CreateMosaicDataset_management(
"C:/workspace/CreateMD.gdb","mosaicds",
"C:/workspace/World_Mercator.prj", "3",
"8_BIT_UNSIGNED", "False Color Infrared", "#")
CreateMosaicDataset example 2 (stand-alone script)
This is a Python script sample for CreateMosaicDataset.
#Create 3-Band FGDB Mosaic Dataset
import arcpy
arcpy.env.workspace = "C:/Workspace"
gdbname = "CreateMD.gdb"
mdname = "mosaicds"
prjfile = "C:/Workspace/World_Mercator.prj"
noband = "3"
pixtype = "8_BIT_UNSIGNED"
pdef = "NONE"
wavelength = ""
arcpy.CreateMosaicDataset_management(gdbname, mdname, prjfile, noband,
pixtype, pdef, wavelength)
Environments
Licensing information
- ArcGIS for Desktop Basic: No
- ArcGIS for Desktop Standard: Yes
- ArcGIS for Desktop Advanced: Yes