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 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 |
Code Sample
This is a Python sample for CreateMosaicDataset.
import arcpy arcpy.CreateMosaicDataset_management("c:/workspace/CreateMD.gdb",\ "MyMosDS", "World_Mercator.prj",\ "3", "8_BIT_UNSIGNED")
This is a Python script sample for CreateMosaicDataset.
##=========================== ##Create Mosaic Dataset ##Usage: CreateMosaicDataset_management in_workspace in_mosaicdataset_name coordinate_system {num_bands} ## {1_BIT | 2_BIT | 4_BIT | 8_BIT_UNSIGNED | 8_BIT_SIGNED | 16_BIT_UNSIGNED | 16_BIT_SIGNED | ## 32_BIT_UNSIGNED | 32_BIT_SIGNED | 32_BIT_FLOAT | 64_BIT} try: import arcpy arcpy.env.workspace = r"C:\Workspace" ##Create 3-Band FGDB Mosaic Dataset arcpy.CreateMosaicDataset_management("CreateMD.gdb","mosaicds", "World_Mercator.prj", "3", "8_BIT_UNSIGNED") ##Create 1-Band PGDB Mosaic Dataset arcpy.CreateMosaicDataset_management("CreateMD.mdb","mosaicds", "GCS_WGS_1984.prj", "1", "") ##Create SDE Mosaic Dataset arcpy.CreateMosaicDataset_management("SDE94.sde","mosaicds", "GCS_WGS_1984.prj", "6", "16_BIT_UNSIGNED") except: print "Create Mosaic Dataset exsample failed." print arcpy.GetMessages()
Environments
- Output Coordinate System
Will only be used if the Coordinate System parameter is not defined