Merge Multidimensional Rasters (Multidimension)

Summary

Combines multiple multidimensional raster datasets spatially, or across variables and dimensions.

Usage

  • This tool creates a merged multidimensional raster dataset from a list of multidimensional rasters. For example, if you have a mosaic dataset that contains 30 years of monthly precipitation data and another dataset with 10 years of monthly temperature data, you can combine them into a multidimensional raster with both variables.

  • If the input multidimensional rasters contain different variables, the output multidimensional raster will contain all the variables.

  • If the input multidimensional rasters contain different dimensions or dimension values, the output multidimensional raster will include all the dimensions and dimension values.

  • If the input multidimensional rasters contain the same dimensions and variables but different spatial extents, the output multidimensional raster will include the variables and dimensions across the merged spatial extents.

  • This tool produces a multidimensional raster dataset in Cloud Raster Format (CRF). Currently, no other output formats are supported.

Syntax

arcpy.md.MergeMultidimensionalRasters(in_multidimensional_rasters, out_raster, {resolve_overlap_method})
ParameterExplanationData Type
in_multidimensional_rasters
[in_multidimensional_rasters,...]

The input multidimensional rasters to be combined.

Raster Dataset; Raster Layer; Mosaic Dataset; Mosaic Layer; Image Service; File
out_raster

The merged multidimensional raster dataset in Cloud Raster Format (a .crf file).

Raster Dataset
resolve_overlap_method
(Optional)

Specifies the method to use to resolve overlapping pixels in the combined datasets.

  • FIRSTThe pixel value in the overlapping areas will be the value from the first raster in the list of input rasters. This is the default.
  • LASTThe pixel value in the overlapping areas will be the value from the last raster in the list of input rasters.
  • MINThe pixel value in the overlapping areas will be the minimum value of the overlapping pixels.
  • MAXThe pixel value in the overlapping areas will be the maximum value of the overlapping pixels.
  • MEANThe pixel value in the overlapping areas will be the average of the overlapping pixels.
  • SUMThe pixel value in the overlapping areas will be the total sum of the overlapping pixels.
String

Code sample

MergeMultidimensionalRasters example 1 (Python window)

Merge two multidimensional rasters with different variables.

# Import system modules
import arcpy

# Append slices from two multidimensional rasters with temperature data
arcpy.md.MergeMutidimensionalRasters(
	["C:/data/temp1980_1990.crf", "C:/data/precip1980_1990.crf"], 
	"C:/data/temp_precip_1980_1990.crf")
MergeMultidimensionalRasters example 2 (stand-alone script)

Merge two multidimensional rasters with different dimension values.

# Import system modules
import arcpy

# Define input parameters
input_multidimensional_rasters = "C:/data/hycom_2000_2019.crf", "C:/data/hycom_2020.crf"]
output_multidimensional_raster = "C:/new_data/hycom2000_2020.crf"


# Merge the dimension values for the variables
arcpy.md.MergeMutidimensionalRaster(
	input_multidimensional_rasters, output_multidimensional_raster)
MergeMultidimensionalRasters example 3 (stand-alone script)

Merge two multidimensional rasters with different spatial extents.

# Import system modules
import arcpy

# Define input parameters
input_multidimensional_rasters = "C:/data/hycom_East.crf", "C:/data/hycom_WEST.crf"]
output_multidimensional_raster = "C:/new_data/hycom_ALL.crf"


# Merge the spatial regions of the input data
arcpy.md.MergeMutidimensionalRaster(
	input_multidimensional_rasters, output_multidimensional_raster, "FIRST")

Licensing information

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

Related topics