Summary
Creates 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.
Starting at ArcGIS Desktop 10.5, mosaic datasets created in Oracle, PostgreSQL, or SQL Server geodatabases will be created with the new RASTER_STORAGE keyword called RASTERBLOB. The RASTERBLOB keyword implements an efficient transfer of the mosaic dataset catalog items to the DBMS.
Mosaic datasets created with RASTERBLOB cannot be opened with earlier versions of the software. If you want to create mosaic datasets that are backward compatible with earlier versions, you will need to alter the configuration keyword for RASTER_STORAGE to one of the following compatible keywords:
- BINARY for PostgreSQL and SQL Server
- BLOB for Oracle.
The name of the mosaic dataset must stay within the limits of the geodatabase or underlying database; for example, the name cannot start with a number.
Syntax
CreateMosaicDataset(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. Starting at ArcGIS Desktop 10.5, mosaic datasets created in Oracle, PostgreSQL, or SQL Server geodatabases will be created with the new RASTER_STORAGE keyword called RASTERBLOB. The RASTERBLOB keyword implements an efficient transfer of the mosaic dataset catalog items to the DBMS. Mosaic datasets created with RASTERBLOB cannot be opened with earlier versions of the software. If you want to create mosaic datasets that are backward compatible with earlier versions, you will need to alter the configuration keyword for RASTER_STORAGE to one of the following compatible keywords:
| Workspace |
in_mosaicdataset_name | The name of the mosaic dataset you are creating. | String |
coordinate_system | The coordinate system for all of the items in the mosaic dataset. | Coordinate System |
num_bands (Optional) | The number of bands the raster datasets will have in the mosaic dataset. | 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 include the standard raster data types 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 |
Derived Output
Name | Explanation | Data Type |
out_mosaic_dataset | The updated mosaic dataset. | Mosaic Dataset |
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
- Basic: No
- Standard: Yes
- Advanced: Yes