Skip to main content

Mosaic

Overview

Mosaic is a basic raster data processing operation that merges multiple input raster datasets into a new raster dataset. It can integrate adjacent or overlapping raster images into one unified output, making subsequent analysis, display, and data management easier.

  • Purpose: Integrates spatial locations and values by joining multiple source datasets into a unified spatial reference and data structure.
  • Data consistency: The output raster can use consistent settings for cell size, band count, spatial reference, cell type, and related properties.
  • Conflict handling: For overlapping areas, you can specify overlay rules such as first, last, mean, minimum, maximum, or sum.

Use Cases

  • Remote sensing image stitching: Merge multiple adjacent satellite scenes into complete coverage for an area.
  • Large-area terrain merging: Merge partitioned DEM data into a continuous large-area terrain model.
  • Environmental monitoring synthesis: Combine climate, soil, and other raster data from different administrative regions into regional datasets.
  • Data update and repair: Use higher-precision or newer imagery to cover or replace specific areas in existing imagery.

Parameters

ParameterDescriptionNotes
Input rasterSelect multiple raster files, or folders that contain raster files, to participate in the mosaic.Click + to add items in batches.
Mosaic methodDefines the cell value calculation rule for overlapping areas, such as first, last, or mean.See the mosaic method descriptions below.
Output typeWhen saving raster data, you can manually configure raster output settings or use a snap raster.See common raster output.
Output fileSpecifies the storage location and file name of the output raster after mosaicking.See common raster output.

Processing Notes

Overlap Handling Methods

MethodOutput cell value
FirstThe output cell value in the overlap area comes from the first raster dataset participating in the mosaic.
LastThe output cell value in the overlap area comes from the last raster dataset participating in the mosaic, overwriting earlier values.
MeanThe output cell value in the overlap area is the mean of all overlapping cells.
MinimumThe output cell value in the overlap area is the minimum value of all overlapping cells.
MaximumThe output cell value in the overlap area is the maximum value of all overlapping cells.
SumThe output cell value in the overlap area is the sum of all overlapping cell values.

Rules for Rasters with Different Extents and Resolutions

When multiple rasters participating in processing have different spatial extents, cell structures, or data types, iXGIS standardizes them according to the following rules.


1. Spatial Geometry Processing (Extent and Cell Structure)

When the spatial extent or cell structure (resolution, rows, or columns) of the input rasters is inconsistent, the system automatically performs resampling and grid alignment.

Different extents:

  • The output extent is the union of the spatial extents of all input rasters.
  • Areas not covered by any input data are filled with NoData.

Different cell counts or resolutions:

  • Each raster file can have only one cell size.
  • When input rasters have different resolutions, the system uses the cell size of the first input raster as the output resolution.
  • The system automatically shifts and aligns grids so that all cells fall within a unified raster grid.

2. Data Type Processing (Band Data Type)

When input rasters have different band data types, the system follows an upward compatibility rule to avoid numeric overflow or precision loss.

Different data types:

  • The output data type is automatically promoted to the widest type that can accommodate all input values.
  • Examples:
    • Merging 8-bit integer and 16-bit integer data produces 16-bit integer output.
    • Merging integer and floating-point data produces floating-point output.

Different band counts:

  • The output band count follows the first input raster.

Operating Steps

  1. Start the tool

    Open the Raster Basic Tools toolbox, go to Raster Data > Raster Dataset, and double-click Mosaic to open the tool pane.

  2. Add input data

    • Click the add button above the Input raster list and select multiple raster files to be stitched.
    • Make sure the files are ordered correctly in the list, because the order affects the First and Last mosaic rules.
  3. Select a mosaic method

    • In the Mosaic method drop-down list, select an appropriate rule, such as Mean or Maximum.
  4. Configure output spatial properties

    • In the Output type drop-down list, select a configuration mode: manual input, use vector, or use raster.
    • It is recommended to select one input raster as the reference to inherit its coordinate system and resolution.
  5. Set the output file and properties

    • Click the button beside Output file, specify the save path, and enter a file name, such as mosaic_result.tif.
    • Configure the data type, NoData value, and compression method as needed.
  6. Run the tool

    • Click Execute at the bottom of the window and wait for the task to finish.

Notes

  • Band consistency: Rasters participating in the mosaic should have the same number of bands. Otherwise, the system may retain only the overlapping bands.
  • Spatial reference: Input data should use the same coordinate system. If coordinate systems differ, the system reprojects data during mosaicking, which may consume more computing resources.
  • Data type: The output data type should be able to store the calculated result. For example, when using the Mean method, a floating-point data type is recommended.
  • Performance optimization: When processing very large datasets, build pyramids in advance and use LZW compression.