Create Mosaic Dataset (Data Management)

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 Pro 1.4, 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

arcpy.management.CreateMosaicDataset(in_workspace, in_mosaicdataset_name, coordinate_system, {num_bands}, {pixel_type}, {product_definition}, {product_band_definitions})
ParameterExplanationData Type
in_workspace

The path to the geodatabase.

Starting at ArcGIS Pro 1.4, 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.

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.

  • 1_BITA 1-bit unsigned integer. The values can be 0 or 1.
  • 2_BITA 2-bit unsigned integer. The values supported can be from 0 to 3.
  • 4_BITA 4-bit unsigned integer. The values supported can be from 0 to 15.
  • 8_BIT_UNSIGNEDAn unsigned 8-bit data type. The values supported can be from 0 to 255.
  • 8_BIT_SIGNEDA signed 8-bit data type. The values supported can be from -128 to 127.
  • 16_BIT_UNSIGNEDA 16-bit unsigned data type. The values can range from 0 to 65,535.
  • 16_BIT_SIGNEDA 16-bit signed data type. The values can range from -32,768 to 32,767.
  • 32_BIT_UNSIGNEDA 32-bit unsigned data type. The values can range from 0 to 4,294,967,295.
  • 32_BIT_SIGNEDA 32-bit signed data type. The values can range from -2,147,483,648 to 2,147,483,647.
  • 32_BIT_FLOATA 32-bit data type supporting decimals.
  • 64_BITA 64-bit data type supporting decimals.
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:

  • NONENo band ordering is specified for the mosaic dataset. This is the default.
  • NATURAL_COLOR_RGBCreate a 3-band mosaic dataset, with red, green, and blue wavelength ranges. This is designed for natural color imagery.
  • NATURAL_COLOR_RGBICreate a 4-band mosaic dataset, with red, green, blue, and near infrared wavelength ranges.
  • VECTOR_FIELD_UVCreate a mosaic dataset displaying two variables.
  • VECTOR_FIELD_MAGNITUDE_DIRECTIONCreate a mosaic dataset displaying magnitude and direction.
  • FALSE_COLOR_IRGCreate a 3-band mosaic dataset, with near infrared, red, and green wavelength ranges.
  • DMCII_3BANDSCreate a 3-band mosaic dataset using the DMCii wavelength ranges.
  • DEIMOS2_4BANDSCreate a 4-band mosaic dataset using the Deimos-2 wavelength ranges.
  • DUBAISAT-2_4BANDSCreate a 4-band mosaic dataset using the DubaiSat-2 wavelength ranges.
  • FORMOSAT-2_4BANDSCreate a 4-band mosaic dataset using the FORMOSAT-2 wavelength ranges.
  • GEOEYE-1_4BANDSCreate a 4-band mosaic dataset using the GeoEye-1 wavelength ranges.
  • GF-1 PMS_4BANDSCreate a 4-band mosaic dataset using the Gaofen-1 Panchromatic Multispectral Sensor wavelength ranges.
  • GF-1 WFV_4BANDSCreate a 4-band mosaic dataset using the Gaofen-1 Wide Field of View Sensor wavelength ranges.
  • GF-2 PMS_4BANDSCreate a 4-band mosaic dataset using the Gaofen-2 Panchromatic Multispectral Sensor wavelength ranges.
  • GF-4 PMI_4BANDSCreate a 4-band mosaic dataset using the Gaofen-4 panchromatic and multispectral wavelength ranges.
  • HJ 1A/1B CCD_4BANDSCreate a 4-band mosaic dataset using the Huan Jing-1 CCD Multispectral or Hyperspectral Sensor wavelength ranges.
  • IKONOS_4BANDSCreate a 4-band mosaic dataset using the IKONOS wavelength ranges.
  • JILIN-1_3BANDSCreate a 3-band mosaic dataset using the Jilin-1 wavelength ranges.
  • KOMPSAT-2_4BANDSCreate a 4-band mosaic dataset using the KOMPSAT-2 wavelength ranges.
  • KOMPSAT-3_4BANDSCreate a 4-band mosaic dataset using the KOMPSAT-3 wavelength ranges.
  • LANDSAT_6BANDSCreate a 6-band mosaic dataset using the Landsat 5 and 7 wavelength ranges from the TM and ETM+ sensors.
  • LANDSAT_8BANDSCreate an 8-band mosaic dataset using the LANDSAT 8 wavelength ranges.
  • LANDSAT_MSS_4BANDSCreate a 4-band mosaic dataset using the Landsat wavelength ranges from the MSS sensor.
  • PLEIADES-1_4BANDSCreate a 4-band mosaic dataset using the PLEIADES-1 wavelength ranges.
  • QUICKBIRD_4BANDSCreate a 4-band mosaic dataset using the QuickBird wavelength ranges.
  • RAPIDEYE_5BANDSCreate a 5-band mosaic dataset using the RapidEye wavelength ranges.
  • SENTINEL2_13BANDSCreate a 13-band mosaic dataset using the Sentinel 2 MSI wavelength ranges.
  • SKYSAT_4BANDSCreate a 4-band mosaic dataset using the SkySat-C MSI wavelength ranges.
  • SPOT-5_4BANDSCreate a 4-band mosaic dataset using the SPOT-5 wavelength ranges.
  • SPOT-6_4BANDSCreate a 4-band mosaic dataset using the SPOT-6 wavelength ranges.
  • SPOT-7_4BANDSCreate a 4-band mosaic dataset using the SPOT-7 wavelength ranges.
  • TH-01_4BANDSCreate a 4-band mosaic dataset using the Tian Hui-1 wavelength ranges.
  • WORLDVIEW-2_8BANDSCreate an 8-band mosaic dataset using the WorldView-2 wavelength ranges.
  • WORLDVIEW-3_8BANDSCreate an 8-band mosaic dataset using the WorldView-3 wavelength ranges.
  • WORLDVIEW-4_4BANDSCreate a 4-band mosaic dataset using the WorldView-4 wavelength ranges.
  • ZY1-02C PMS_3BANDSCreate a 3-band mosaic dataset using the ZiYuan-1 panchromatic/multispectral wavelength ranges.
  • ZY3-CRESDA_4BANDSCreate a 4-band mosaic dataset using the ZiYuan-3 CRESDA wavelength ranges.
  • ZY3-SASMAC_4BANDSCreate a 4-band mosaic dataset using the ZiYuan-3 SASMAC wavelength ranges.
  • CUSTOMDefine the number of bands and the average wavelength for each band.
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

NameExplanationData 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)

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics