Summary
Edits a multidimensional raster by adding or deleting variables or dimensions.
Usage
Use this tool to edit a multidimensional raster. This does not generate a new dataset; it modifies the multidimensional raster. To create a dataset, use the Subset Multidimensional Raster tool or the Copy Raster tool before making additional edits with this tool.
The target and input rasters must be in Cloud Raster Format (CRF). Currently, no other format is supported in this tool. To convert a multidimensional mosaic dataset or a multidimensional raster layer to a .crf file, use the Copy Raster tool, choose CRF as the output format, and choose to process the dataset as multidimensional.
The Manage Mode parameter sets the type of editing operation to be performed. There are six options:
- Add Dimension—Add a dimension to the dataset. The name, description, and unit of the dimension must be provided. After the dimension is added, slices from another multidimensional dataset with the same dimension can be appended.
If the target raster is a standard .crf raster, adding a dimension will make the target a multidimensional raster and add the Multidimensional Info in the raster properties.
- Remove Dimension—Remove a dimension from the dataset. If there is only one dimension, there can be only one slice in the dataset.
- Append Slices—Add slices from one or more input multidimensional rasters to the end of the stack of slices in the target multidimensional raster. The variable and dimension names in the multidimensional rasters must match exactly, and there can be no overlapping dimension values between the rasters. The appended slices must have dimension values that come after the end of the dimension values in the target multidimensional raster.
- Replace Slices—Delete slices from the target multidimensional raster and replace them with slices from another multidimensional raster. The variable and dimension names in the multidimensional rasters must match exactly, and only the overlapping slices will be replaced.
- Append Variables—Add all the variables from one or more input multidimensional rasters to the end of the list of variables in the target multidimensional raster. If the variable name already exists in the target multidimensional raster, it will not be added. If multiple input multidimensional rasters contain a variable of the same name, the variable from the first listed input raster will be added to the target multidimensional raster.
- Delete Variables—Delete one or more variables, and the corresponding slices, from the target multidimensional raster. There must be at least one variable remaining in the multidimensional raster.
- Add Dimension—Add a dimension to the dataset. The name, description, and unit of the dimension must be provided. After the dimension is added, slices from another multidimensional dataset with the same dimension can be appended.
Input data must have exactly the same spatial reference, spatial extent, and cell size to use Append Slices, Replace Slices, or Append Variables.
Syntax
ManageMultidimensionalRaster(target_multidimensional_raster, {manage_mode}, {variables}, {in_multidimensional_rasters}, {dimension_name}, {dimension_value}, {dimension_description}, {dimension_unit})
Parameter | Explanation | Data Type |
target_multidimensional_raster |
The multidimensional raster to modify. | Raster Dataset; Raster Layer |
manage_mode (Optional) | Specifies the type of modification that will be performed on the target raster.
| String |
variables [variables,...] (Optional) | The variable or variables that will be modified in the target multidimensional raster. This parameter is required if the operation being performed is a modification of an existing variable. If no variable is specified, the first variable in the target multidimensional raster will be modified. | String |
in_multidimensional_rasters [in_multidimensional_rasters,...] (Optional) | The multidimensional raster datasets that contain the slices or variables to be added to the target multidimensional raster. This parameter is required when manage_mode is set to APPEND_SLICES, REPLACE_SLICES, or APPEND_VARIABLES. | Raster Layer |
dimension_name (Optional) | The name of the new dimension to be added to the raster properties. This parameter is required if manage_mode is set to ADD_DIMENSION. | String |
dimension_value (Optional) | The value of the dimension to be added. The value can be a single value or a range of values. For a range of values, provide the minimum and maximum values separated by a comma. For example, for a new height dimension, enter 0,10 to generate a dimension in which the first slice contains information for the first 10 meters of height. This parameter is required if manage_mode is set to ADD_DIMENSION. | String |
dimension_description (Optional) | The description of the new dimension to be added to the raster properties for metadata purposes. This parameter is enabled if manage_mode is set to ADD_DIMENSION. | String |
dimension_unit (Optional) | The unit of the new dimension to be added to the raster properties for metadata purposes. This parameter is enabled if manage_mode is set to ADD_DIMENSION. | String |
Derived Output
Name | Explanation | Data Type |
updated_target_multidimensional_raster | The modified multidimensional raster. | Raster Layer |
Code sample
This example appends slices to the end of a multidimensional raster.
# Import system modules
import arcpy
# Append slices from two multidimensional rasters with temperature data
arcpy.md.ManageMutidimensionalRaster(
target = "C:/data/temp1980_1990.crf", manage_mode = "APPEND_SLICES",
variables = "Temp", in_multidimensional_rasters =
["C:/new_data/temp1991.crf", "C:/new_data/temp1992.crf"])
This example replaces slices, adds a variable, and adds a dimension to the target multidimensional raster.
# Import system modules
import arcpy
# Define input parameters
target_multidimensional_raster = "C:/data/hycom.crf"
manage_mode_replace = "REPLACE_SLICES"
manage_mode_append = "APPEND_VARIABLES"
manage_mode_newDimension = "ADD_DIMENSION"
variables = "water_temp"
replace_multidimensional_rasters = "C:/new_data/new_hycom1985.crf"
salinity_multidimensional_raster = "C:/data/salinity.crf"
dimension_name = "Depth"
dimension_value = "0,5"
dimension_description = "Depth at 5m increments"
dimension_unit = "meter"
# Replace existing slices with new slices
arcpy.md.ManageMutidimensionalRaster(target_multidimensional_raster,manage_mode_replace,
variables, replace_multidimensional_rasters)
# Append salinity variable
arcpy.md.ManageMutidimensionalRaster(target_multidimensional_raster, manage_mode_append,
'', salinity_multidimensional_raster)
# Add a new dimension, depth, for the water temperature variable
# Depth will be measured in 5 meter increments
arcpy.md.ManageMutidimensionalRaster(target_multidimensional_raster, manage_mode_newDimension,
variables, None, dimension_name, dimension_value, dimension_description, dimension_unit)
This example removes dimensions from a single-slice multidimensional raster.
# Import system modules
import arcpy
# Define input parameters
target_multidimensional_raster = "C:/data/precip.crf"
manage_mode = "REMOVE_DIMENSION"
# Remove dimension to make input data dimensionless
arcpy.ManageMutidimensionalRaster_md(target_multidimensional_raster,
manage_mode)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes