Create Mosaic Dataset (Data Management)
Summary
Makes an empty mosaic dataset in a geodatabase.
Usage
-
The destination geodatabase can be file, personal, or ArcSDE.
-
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
Parameter | Explanation | Data Type |
in_workspace |
The path and name of a geodatabase. | Workspace |
in_mosaicdataset_name |
The name of the mosaic dataset. | String |
coordinate_system |
The coordinate system for the mosaic dataset, which will be used for all the associated files or features created. | Spatial Reference |
num_bands (Optional) |
The number of raster dataset bands supported by the mosaic dataset. | Long |
pixel_type (Optional) |
The bit depth of a cell, used to determine the range of values that the mosaic dataset output. For example, an 8-bit mosaic dataset can have 256 unique pixel values, which range from 0 to 255. If it is not defined, it will be taken from the first raster dataset.
| String |
product_definition (Optional) |
A template defining the number of bands and mid-wavelength ranges for each band.
| String |
product_band_definitions [Band Name {Wavelength Minimum} {Wavelength Maximum},...] (Optional) | The band and wavelength information for the product_definition can be edited. You can modify the wavelengths, change the band order, or you can add or remove bands when using the CUSTOM product definition. | Value Table |
Code Sample
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", "#")
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
- Output Coordinate System
Will only be used if the Coordinate System parameter is not defined