Use mosaic datasets and image services in geoprocessing tools

Mosaic datasets and image services can be used as inputs to geoprocessing tools; consider their use when designing them and their content when using them.

Design a mosaic dataset for analysis

If you're designing a mosaic dataset that will be used for analysis, there are a few characteristics that impact the use of the mosaic dataset in analysis:

  • The resolution (pixel size) of the data
  • The limit on the request size
  • The limit on the number of rasters per mosaicked image (request)

The resolution can impact the quality and validity of your analysis. For example, if you're performing geospecific analysis with the data, the accuracy of the result depends on the least accurate dataset in the collection. For example, if you have a 10-meter resolution elevation dataset and a 2-meter one, if you resample the 10-meter dataset to 2 meters, it does not become more accurate. If you combine them, the area covered by the datasets is only as accurate as the 10-meter dataset.

Some overviews, or other low-resolution items in a mosaic dataset, may incorrectly impact the resolution for analysis. In these cases, you want to use the most appropriate resolution (not the overviews). You may also want to use raster data that has a consistent resolution, rather than combine different resolutions into a mosaic dataset. In either case, verify or set the cell size for the mosaic dataset that is appropriate for the type of analysis.

  1. Right-click the mosaic dataset in the Catalog pane and click Properties.
  2. Click the General tab.

    The Cell Size (X, Y) property is under Raster Information. This is the cell or pixel size that is used when performing analysis or processing that uses the pixel size. This default value is the smallest cell size (LowPS) used in the mosaic dataset. For example, you have two elevation datasets in a mosaic dataset: one covers an entire city at a resolution of 1 meter and the other covers a neighborhood at a resolution of 50 centimeters. In this case, the cell size of the mosaic dataset will be 50 centimeters. Depending on how this mosaic dataset is being used, you may want to change the mosaic dataset's cell size to 1 meter. That way, any analysis on the entire area will use an appropriate cell size. If required, a user can specify the cell size they want when processing; therefore, if they're only using the higher-resolution dataset in an analysis, they can specify the 50-centimeter size.

  3. Click the Edit button next to the Cell Size (X, Y) property.
  4. Provide a new cell size. Alternatively, click the Set Default button to reset the values to the original default values.
  5. Click OK to close each dialog box.

Alternatively, you can use the Set Mosaic Dataset Properties tool and change the Output Cell Size parameter value.

The limit on the request size impacts the size of the dataset that can be analyzed. Mosaic datasets have a maximum request size property that limits the numbers of rows and columns that can be accessed or exported. The size of the image being processed by the tool may be smaller than the analysis requires. Additionally, the limit on the number of rasters that can be combined to create the mosaicked image can be exceeded in some analysis operations. This can result in an output with missing content. Both of the request size properties can be increased in the source mosaic dataset properties.

  1. Right-click the mosaic dataset in the Catalog pane and click Properties.
  2. Click the Defaults tab.
  3. Provide new values for the Maximum Size of Requests, Rows, and Columns properties.
  4. Provide a new value for the Maximum Number Of Rasters Per Mosaic property.
  5. Click OK to close the dialog box.

Alternatively, you can use the Set Mosaic Dataset Properties tool and define new values in the Rows of Maximum Image Size Requests, Columns of Maximum Image Size of Requests, and Max Number Per Mosaic parameters.

Considerations when using mosaic datasets and image services in analysis

When mosaic datasets, and the image services published from them, contain multiple resolutions of data and are extremely large, consider the following:

  • Mosaic datasets and image services have a maximum request size property that limits the numbers of rows and columns that can be exported. The size of the image processed by the tool may be smaller than required. This property can only be increased in the source mosaic dataset properties or by the server administrator. Alternatively, process a chunk at a time.

    To change this value, see the steps above.

    If you exceed this value, an error occurs.

  • Mosaic datasets or image services contain images with different cell sizes. The overviews are reduced-resolution versions of the input images at coarser spatial resolutions. If the requested cell size is not defined in the environment setting, the tools process the mosaic dataset or image service using its base cell size (the cell size defined in the dataset's properties).

    To determine the appropriate cell size, see the steps below.

    To lock to specific rasters, see the steps below.

    Note:

    Only the tools in the Spatial Analyst toolbox and the 3D Analyst toolbox use the Cell Size parameter value in the geoprocessing environments. For other tools, create an in-memory layer that defines the cell size, such as using the Make Mosaic Layer tool.

  • Mosaic datasets or image services contain imagery covering the earth. If you don't want all the content processed, limit the extent using one of the layer tools described below.

Caution:

Setting the correct cell size and extent is important when using geoprocessing tools.

Tools on the toolbars

When the input is a mosaic dataset or image service, the cell size and extents are set to the screen resolution of the data and the display extent.

Mosaic datasets

Mosaic datasets can be used in most geoprocessing tools that accept raster datasets. For geoprocessing tools that do not accept a mosaic dataset directly, you can use a mosaic layer in the geoprocessing tool. For more information about whether a mosaic dataset is accepted in a tool, browse the options for the input raster for any geoprocessing tool.

Supported raster formats for geoprocessing tool

When scripting with Python, you can specify the input with the path to the mosaic dataset or use the Make Mosaic Layer tool to create an in-memory mosaic layer first; then set the input with the in-memory layer name.

Image services

There are two ways to use an image service in a geoprocessing tool, and both require the image service to be a layer. This is because there are many settings that can affect an image service. An image service cannot be dragged to the tool's input directly from the server connection.

You can add the image service to ArcGIS AllSource and use the layer created in the Contents pane. First, add the image service to a map, then open the tool. This way, the layer is recognized as a valid input type and becomes selectable from the tool's input drop-down list. It can also be selected in the integrated Python window in the same manner as a normal raster layer.

The second way to use the image service in a geoprocessing tool is using the Make Image Server Layer tool. This creates a temporary raster layer from an image service that can be used as input for tools that support the raster layer input type.

The Make Image Server Layer tool takes the image service URL as input, and it has additional settings to define the output layer's extent, band number, and mosaic methods. The size of the output layer is limited by the request size property of the image service.

Determine the cell size

To determine the cell size to use in your analysis, consider the cell sizes represented in the mosaic dataset or image service and whether the rasters with this cell size cover the area to be analyzed.

  1. Add the mosaic dataset or image service to ArcGIS AllSource.
  2. Open the properties of the mosaic dataset image to the Source tab and click Raster Information.
  3. Examine the Cell Size X and Y property, which indicates the cell size.
  4. Open the attribute table and review the values in the LowPS field.

    Multiple unique LowPS values indicate that the mosaic dataset or image service contains rasters of multiple resolutions.

  5. Select the rasters with the LowPS cell sizes you want to use and examine their extent for your analysis.

Use specific rasters in mosaic datasets or image services

You can use one or more raster datasets in a mosaic dataset as the input to tools.

In ArcGIS AllSource, complete the following steps:

  1. Add the mosaic dataset to a map in ArcGIS AllSource.
  2. In the Catalog pane, select the mosaic dataset image to enable the Image Layer Data tab.
  3. Click the Explore Raster Items button to expand Raster Item Explorer.
  4. Raster Item Explorer has many tools you can use to access information about the individual images in the mosaic dataset, image service, or imagery layer. You can view metadata about the individual images and a preview of the selected image, and create a layer with the selected image.
  5. Adjust the map extent to locate the image that you want to lock.
  6. In Raster Item Explorer, click the Apply button to populate the list of visible images.
  7. Choose an option to select one of the images or use the Selection options to locate the image.
  8. Select the image or images to lock as the only visible image or images.
  9. Click the lock button in the selected image.
    The map updates to reflect the selection. The footprint and boundary layers are visible, and the image display changes to reflect the selection.
  10. Optionally, click the lock button to unlock the image to make another selection.
  11. When you're finished, close Raster Item Explorer.