Creating a mosaic dataset
This topic applies to ArcGIS for Desktop Standard and ArcGIS for Desktop Advanced only.
Creating mosaic dataset basics
Mosaic datasets are used to manage, display, serve, and distribute raster data. They are created, edited, and managed with the tools in the Mosaic Dataset toolset in the Data Management toolbox.
When you create a new mosaic dataset, it is created as an empty container in the geodatabase with some default properties to which you can add raster data. You must have write access to that geodatabase and an ArcGIS for Desktop Standard or ArcGIS for Desktop Advanced license.
Minimum steps to create a mosaic dataset and add data
- Create the mosaic dataset.
- To create the mosaic dataset, right-click the geodatabase in the Catalog window or ArcCatalog and select New > Mosaic Dataset. This will open the Create Mosaic Dataset tool. Or you can directly access and open the Create Mosaic Dataset tool.
- You must specify a name and a spatial reference. The spatial reference does not need to match the raster data you are adding; however, it will be used to create any of the additional components, such as the boundary and footprints. It will also be the default spatial reference of the mosaic dataset when it is accessed; therefore, any raster datasets in a different spatial reference will be reprojected on the fly to create the mosaicked image.
- Add data to the mosaic dataset.
- To add data to the mosaic dataset, you can right-click on it in the Catalog window or ArcCatalog and click Add Rasters. You can drag and drop the data you want to add onto the mosaic dataset. Both of these actions will open the Add Rasters to Mosaic Dataset tool. Or you can directly access and open the Add Rasters to Mosaic Dataset tool.
- You must choose a raster type and enter the location of the input data.
- Check Update Overviews.
When this tool runs it adds the data, calculates the information it needs, and generates the overviews. Once it's complete, your mosaic dataset will be ready to use or publish.
When you add a mosaic dataset to ArcMap, it will be added as a custom group layer. By default, you will see a Boundary, Footprint, and Image layer.
Learn about the mosaic dataset's layers
If the spatial reference systems of the data and the mosaic dataset or user are based on different spheroids, you may need to define a specific geographic transformation. You can define the transformation in two locations. When adding imagery to the mosaic dataset that has a different datum than the mosaic dataset, set the Geographic Transformation on the Environment Settings dialog box. If you know the user or application will be using a different datum than the source imagery or mosaic dataset, open the mosaic dataset properties (via ArcCatalog or the Catalog window) and click the Defaults tab, then set the Geographic Coordinate System Transformation property.
A referenced mosaic dataset is a special type of a mosaic dataset. This mosaic dataset has limitations and is mainly used to distribute a mosaic dataset so users cannot modify the properties of the original and to provide additional ways to view the data in a mosaic dataset.
Learn about creating a mosaic dataset from an existing raster catalog or mosaic dataset
If you create the mosaic dataset within a personal geodatabase the schema will not be locked when you change the mosaic dataset schema, such as, adding a field or a table. Therefore, you should avoid performing operations that will change the schema when other users may be viewing the mosaic dataset. If you prefer to have the schema locked, then create it in a file or enterprise geodatabase.
Beyond the basics
You can create a mosaic dataset by only defining the name and spatial reference system (as shown in the steps above), but there are additional parameters to help you create better mosaic dataset products that suit your application needs, such as the pixel type, number of bands, and band wavelength information. You can also refine the mosaic dataset by defining properties, such as the display defaults, by defining processing, and by refining the inputs, such as editing their footprints.
Creating the mosaic dataset
In the steps above you did not set any properties or modify the tool parameters. There are additional parameters on the Create Mosaic Dataset tool that help to customize the mosaic dataset to your needs. These control the product properties and the pixel properties of the mosaic dataset, which can impact the data added and the output.
Product properties
The product definition allows you to customize the mosaic dataset to contain data with a specific number of bands and wavelengths. The product definition controls how the data is added to the mosaic dataset, how it displays by default, and aids in some processing.
The most commonly used product definitions are:
- Natural Color (RGB)—This creates a three-band mosaic dataset, with red, green, and blue wavelength ranges.
- Natural Color (RGBI)—This creates a four-band mosaic dataset, with red, green, blue and near infrared wavelength ranges.
- False Color (IRG)—This creates a three-band mosaic dataset, with near infrared, red, and green wavelength ranges.
Using a product definition helps when adding data containing wavelength information in its metadata. If the wavelength information is ordered differently in the inputs, they will all be ordered correctly when added to the mosaic dataset. For example, if band 1 in a QuickBird scene is a blue wavelength, and band 3 in the mosaic dataset is designed to contain the blue wavelengths, then the QuickBird's blue band will be mapped to the mosaic dataset's blue band. Without this, the QuickBird's blue band may be mapped to the mosaic dataset's red band. The correct ordering is shown below.
There are additional product definitions that are designed to support specific satellite imagery products, such as QuickBird and Landsat. You can also create a custom product definition, where you define the number of bands, their order, and their wavelength ranges by editing the Product Band Definitions parameter.
If you create a mosaic dataset using a product definition with fewer bands than the input, then the extra bands will be excluded from the mosaic dataset. For example, if the mosaic dataset's product definition is Natural Color (RGBI) and the input has five bands, then one of the bands will be excluded from the mosaic dataset. This will be the band with the wavelength range furthest from the ranges defined for the RGBI bands.
If there are more bands in the mosaic dataset than in the input, the mosaic dataset will not contain an empty band. The band with the wavelength closest to the extra band will be used.
If the input doesn't have wavelength information, it can still be added to the mosaic dataset, but it will be up to you to make sure the bands are added in the correct order. You may need to use the Extract Bands function to map the bands in a different order than how they are stored.
Pixel properties
As an alternative to defining a product definition, you can define the number of bands in the mosaic dataset and the output pixel type. The number of bands and pixel type are properties of the mosaic dataset, just as they are a raster dataset. If these are not defined when you create the mosaic dataset, they will be identified by the application. By default, this information is derived from the first raster added to the mosaic dataset or altered by functions you may add that change these defaults.
If you're mixing the types of raster data used in the mosaic dataset, it is recommended that you define these values. For example, if using raster data from single-band orthophotos and a three-band orthophoto, you should specify three bands'; otherwise, if the single-band orthophoto is added first, then only the first band of the three-band orthophoto will be added. Also, if you're mixing elevation data sources, the inputs could have a mix of pixel types. By defining a pixel type, such as 32-bit float, then you won't lose any information if the first input added is 8 bit and the others are larger.
Adding data to the mosaic dataset
There are many options on the Add Rasters to Mosaic Dataset tool. This topic will discuss some of the common parameters that you may use and some that are already selected by default.
- The Update Cell Size Ranges check box should be checked when adding data. Cell size ranges are used to determine what rasters are processed to create the mosaicked image from the mosaic dataset and must exist. If you plan to immediately add more data, you may opt to calculate the cell sizes for all data at the same time rather than each time you add data, since the existing data and new data will be analyzed and values recalculated or calculated. You can check this option the final time you add data to the mosaic dataset, or use the Calculate Cell Size Ranges tool.
- The Update Boundary check box should be checked when adding data. The boundary is the extent of all the raster datasets, defined by their footprints. Like the previous parameter, if you're adding additional data immediately after, you can opt to calculate the boundary after all your data has been added.
- The Update Overviews check box should be checked when adding data. Overviews are lower-resolution images created to increase the display speed and reduce the CPU usage, since fewer rasters are examined to display the mosaicked image. You should build the overviews once all your data is added to the mosaic dataset (as with the previous parameters). They take time to create; therefore, for a large mosaic dataset, you may want to build them when your system is not busy with other operations. If you choose to generate these at another time, use the Build Overviews tool.
- The Include Sub Folders check box should be checked. This option will recursively explore any subfolders containing the data being added.
- If your workspace contains duplicate data, you can change the Add New Datasets Only parameter to exclude duplicates. This may be very useful; however, it will take more time because it must check every new item with one already added.
- If your data doesn't have statistics, you may want to check Calculate Statistics. This is useful for data that has not been preprocessed (enhanced). If your dataset already has statistics, they will not be recalculated.
- If your data doesn't have pyramids, you may want to check Build Raster Pyramids. Pyramids will reduce the number of overviews that will be generated for the entire mosaic dataset. If your dataset already has pyramids, they will not be recalculated. Note that pyramids are not necessary for the CADRG/ECRG, CIB, and DTED raster types.
- If you want to restrict the data in your workspace that is added, you can define a File Filter, which performs a file name search. For example, there may be thumbnail images stored with the original data. If you're using the Raster Dataset raster type, you may want to specify the valid file extension (such as *.tif) so the thumbnails (such as *.gif) are not added.
When you run the tool to add the data to the mosaic dataset, footprints are created for each raster dataset and the attribute table is populated with each raster. Depending on the options you selected, cell sizes, overviews, pyramids, statistics, and the boundary may be created.
Modifying the properties
There are properties that can be set on the mosaic dataset. These properties affect how the mosaicked image will be presented to the user (or client) and how they might interact with it. They can also impact the performance of the server or image service if the mosaic dataset is published.
You can access the Mosaic Dataset Properties dialog box via the Catalog window or in ArcCatalog by right-clicking the mosaic dataset and clicking Properties. Here, you can make modifications to these properties. You can edit the values in the dialog box by clicking the value next to the property. You will either be able to type in a different value or make a selection from a list. You can also use the Set Mosaic Dataset Properties tool to modify the properties.
Two common properties to set are the compression method and mosaic methods. The compression method can affect the transmission speed. It is recommended that you set a compression method to transmit the mosaicked image more quickly than without compression. If you serve the mosaic dataset as an image service, clients can modify this setting to decompress the mosaicked image if they prefer. The mosaic method defines the order in which the rasters are mosaicked together to create the image. You can choose one or more allowable mosaic methods and which one will be the default. The user is able to choose from the methods you select.
Any properties set on the mosaic layer in the table of contents will only apply to the layer and are not stored with the mosaic dataset, such as the band combination or mosaic method. Therefore, if there are multiple users of the mosaic dataset, they will not be impacted by a layer setting used by another user. This is the same behavior as any dataset and layer in ArcGIS.
Automating the workflow
You can create a model or write a script to create the mosaic dataset, add the data, and edit the properties. The model below uses three tools: one to create a new geodatabase, one to create the mosaic dataset, and another to add the raster data. There are options in the Add Rasters To Mosaic Dataset tool to calculate the cell size ranges, build the boundary, and generate the overviews.