Aggregate Multidimensional Raster (Image Analyst)

Available with Image Analyst license.

Available with Spatial Analyst license.

Summary

Generates a multidimensional raster dataset by combining existing multidimensional raster variables along a dimension.

Usage

  • Use the Aggregation Definition parameter to choose an interval using a keyword, a value, or a range of values. For example, if you have 30 years of sea surface temperature data, collected daily and at every 5 meters depth up to 100 meters, you can use the different interval options for the following scenarios:

    • Aggregate daily temperature data into monthly data, where the result is a multidimensional raster with 12 time slices, and each slice is the aggregate of each month across all the years. Choose Interval Keyword and set the keyword to Recurring Monthly.
    • Aggregate daily temperature data into monthly data, where the result is a multidimensional raster with 360 slices, or 12 time slices per year (30 years x 12 months = 360 slices). Choose Interval Keyword and set the keyword to Monthly.
    • Aggregate monthly temperature data into 4-month intervals. Choose Interval Value, set Value Interval to 4, and set Unit to Months.
    • Aggregate temperature data from 0 to 25 meters, then from 25 to 50 meters, then from 50 to 100 meters. Choose Interval Ranges and specify minimum and maximum depths as 0 25; 25 50; 50 100.
  • Supported multidimensional raster datasets include netCDF, GRIB, HDF, and Esri's CRF. Multidimensional mosaic datasets are also supported.

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

  • By default, the multidimensional raster output will be compressed using the LZ77 compression type. It is recommended, however, that you change the compression type to LERC and adjust the Maximum Error based on your data. For example, if you expect the results of the analysis to be accurate to three decimal places, use 0.001 for the Maximum Error. It's best to avoid unnecessary accuracy requirements, as they will increase the processing time and storage size.

    To change the compression type, modify the Environment setting.

Syntax

AggregateMultidimensionalRaster(in_multidimensional_raster, dimension, {aggregation_method}, {variables}, {aggregation_def}, {interval_keyword}, {interval_value}, {interval_unit}, {interval_ranges}, {aggregation_function}, {ignore_nodata})
ParameterExplanationData Type
in_multidimensional_raster

The input multidimensional raster dataset.

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

The aggregation dimension. This is the dimension along which the variables will be aggregated.

String
aggregation_method
(Optional)

Specifies the mathematical method that will be used to combine the aggregated slices in an interval.

  • MEANThe mean of a pixel's values will be calculated across all slices in the interval. This is the default.
  • MAXIMUMThe maximum value of a pixel will be calculated across all slices in the interval.
  • MAJORITYThe pixel value that occurred most frequently will be calculated across all slices in the interval.
  • MINIMUMThe minimum value of a pixel will be calculated across all slices in the interval.
  • MINORITYThe pixel value that occurred least frequently will be calculated across all slices in the interval.
  • MEDIANThe median value of a pixel will be calculated across all slices in the interval.
  • RANGEThe range of values for a pixel will be calculated across all slices in the interval.
  • STDThe standard deviation of a pixel's values will be calculated across all slices in the interval.
  • SUMThe sum of a pixel's values will be calculated across all slices in the interval.
  • VARIETYThe number of unique pixel values will be calculated across all slices in the interval.
  • CUSTOMThe pixel value will be calculated based on a custom raster function.

When aggregation_method is set to CUSTOM, the aggregation_function parameter becomes enabled.

String
variables
[variables,...]
(Optional)

The variable or variables that will be aggregated along the given dimension. If no variable is specified, all variables with the selected dimension will be aggregated.

For example, to aggregate daily temperature data into monthly average values, specify temperature as the variable to be aggregated. If you do not specify any variables and you have both daily temperature and daily precipitation variables, both variables will be aggregated into monthly averages and the output multidimensional raster will include both variables.

String
aggregation_def
(Optional)

Specifies the dimension interval for which the data will be aggregated.

  • ALLThe data values will be aggregated across all slices. This is the default.
  • INTERVAL_KEYWORDThe variable data will be aggregated using a commonly known interval.
  • INTERVAL_VALUEThe variable data will be aggregated using a user-specified interval and unit.
  • INTERVAL_RANGESThe variable data will be aggregated between specified pairs of values or dates.
String
interval_keyword
(Optional)

Specifies the keyword interval that will be used when aggregating along the dimension. This parameter is required when the aggregation_def parameter is set to INTERVAL_KEYWORD and the aggregation must be across time.

  • HOURLYThe data values will be aggregated into hourly time steps, and the result will include every hour in the time series.
  • DAILYThe data values will be aggregated into daily time steps, and the result will include every day in the time series.
  • WEEKLYThe data values will be aggregated into weekly time steps, and the result will include every week in the time series.
  • DEKADLYThe data values will be aggregated into 3 periods of 10 days each. The last period can contain more or fewer than 10 days. The output will include 3 slices for each month.
  • PENTADLYThe data values will be aggregated into 6 periods of 5 days each. The last period can contain more or fewer than 5 days. The output will include 6 slices for each month.
  • MONTHLYThe data values will be aggregated into monthly time steps, and the result will include every month in the time series.
  • QUARTERLYThe data values will be aggregated into quarterly time steps, and the result will include every quarter in the time series.
  • YEARLYThe data values will be aggregated into yearly time steps, and the result will include every year in the time series.
  • RECURRING_DAILYThe data values will be aggregated into daily time steps, and the result will include one aggregated value per Julian day. The output will include, at most, 366 daily time slices.
  • RECURRING_WEEKLYThe data values will be aggregated into weekly time steps, and the result will include one aggregated value per week. The output will include, at most, 53 weekly time slices.
  • RECURRING_MONTHLYThe data values will be aggregated into monthly time steps, and the result will include one aggregated value per month. The output will include, at most, 12 monthly time slices.
  • RECURRING_QUARTERLYThe data values will be aggregated into quarterly time steps, and the result will include one aggregated value per quarter. The output will include, at most, 4 quarterly time slices.
String
interval_value
(Optional)

The size of the interval that will be used for the aggregation. This parameter is required when the aggregation_def parameter is set to INTERVAL_VALUE.

For example, to aggregate 30 years of monthly temperature data into 5-year increments, enter 5 as the interval_value, and specify interval_unit as YEARS.

Double
interval_unit
(Optional)

The unit that will be used for the interval_value parameter. This parameter is required when the dimension parameter is set to a time field and the aggregation_def parameter is set to INTERVAL_VALUE.

If you are aggregating anything other than time, this option will not be available and the unit for the interval value will match the variable unit of the input multidimensional raster data.

  • HOURSThe data values will be aggregated into hourly time slices at the interval provided.
  • DAYSThe data values will be aggregated into daily time slices at the interval provided.
  • WEEKSThe data values will be aggregated into weekly time slices at the interval provided.
  • MONTHSThe data values will be aggregated into monthly time slices at the interval provided.
  • YEARSThe data values will be aggregated into yearly time slices at the interval provided.
String
interval_ranges
[interval_ranges,...]
(Optional)

Interval ranges specified in a value table will be used to aggregate groups of values. The value table consists of pairs of minimum and maximum range values, with data type Double or Date.

This parameter is required when the aggregation_def parameter is set to INTERVAL_RANGE.

Value Table
aggregation_function
(Optional)

A custom raster function that will be used to compute the pixel values of the aggregated rasters. The input is a raster function JSON object or an .rft.xml file created from a function chain or a custom Python raster function.

This parameter is required when the aggregation_method parameter is set to CUSTOM.

File; String
ignore_nodata
(Optional)

Specifies whether NoData values are ignored in the analysis.

  • DATA The analysis will include all valid pixels along a given dimension and ignore any NoData pixels. This is the default.
  • NODATAThe analysis will result in NoData if there are any NoData values for the pixels along the given dimension.
Boolean

Return Value

NameExplanationData Type
out_multidimensional_raster

The output Cloud Raster Format (CRF) multidimensional raster dataset.

Raster

Code sample

AggregateMultidimensionalRaster example 1 (Python window)

This example aggregates temperature data into yearly data with the average temperature values.

# Import system modules
import arcpy
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

aggMultidim = arcpy.ia.AggregateMultidimensionalRaster("climateData.crf", 
	"StdTime", "MEAN", "temperature", "INTERVAL_KEYWORD", "YEARLY", 
	None, "", None, "", "DATA")

aggMultidim.save("C:/data/YearlyTemp.crf")
AggregateMultidimensionalRaster example 2 (stand-alone script)

This example aggregates daily precipitation and temperature data into monthly data with the maximum precipitation and temperature values.

# Import system modules
import arcpy
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license
arcpy.CheckOutExtension("ImageAnalyst")

# Define input parameters
inputFile = "C:/data/dailyclimateData.crf"
dimensionName = "StdTime"
aggregationMethod = "MAXIMUM"
variables = "temperature;precipitation"
aggregationDefinition = "INTERVAL_KEYWORD"
keyword = "MONTHLY"
ignore_nodata = "DATA"

# Execute 
aggMultidim = arcpy.ia.AggregateMultidimensionalRaster(inFile, dimensionName, 
	variables, aggregationMethod, aggregation_def, keyword, None, "", None, "",
	ignore_nodata)
	
# Save output
aggMultidim.save("C:/data/monthlymaxtemp.crf")

Licensing information

  • Basic: Requires Image Analyst or Spatial Analyst
  • Standard: Requires Image Analyst or Spatial Analyst
  • Advanced: Requires Image Analyst or Spatial Analyst

Related topics