HOW TO

Rename individual Raster Bands in ArcGIS Pro

Last Published: April 20, 2022

Summary

There are a number of reasons and methods to rename bands within a raster. Below, is an outline for three techniques to do so. 

Procedure

Data Interoperability
The Data Interoperability plugin in ArcGIS Pro enables the creation of a model that separates bands from a raster, then renames them.
The transformers used:

  • RasterBandPropertyExtractor - Extracts the band names as a list attribute
  • RasterBandSelector - Selects a band
  • RasterBandNameSetter - Sets the name to the selected band

See the SAFE documentation and message boards regarding Data Interoperability toolsets for clarification. The related link section below contains a sample of a user's model for raster band renaming.

Create Mosaic Dataset
Using the Create Mosaic Dataset tool enables creating band definitions, thereby renaming them. This is a great workflow for once-off edits.
These changes can be made in the Product Properties sub-category.

ArcPy
ArcPy is the superior method in terms of flexibility, when working with a variety of raster types, with varying numbers of bands, and needing to repeat the workflow, adapting the below script is a simple process.

import arcpy
im = r"C:\Directory\ArcGIS\Projects\Multiband\Multi_Band.tif"
rast = arcpy.Raster(im)
bandnames = [arcpy.Raster(b) for b in arcpy.ListRasters()] 

rast.renameBand('The_Band', 'Band_11')
rast.renameBand('The_Band2', 'Band_22')
rast.renameBand('The_Band3', 'Band_33')
rast.renameBand('The_Band4', 'Band_44')

print(rast.bandNames)
Note:
The rast.renameBand function only works when referencing data that is not located in a file geodatabase. Hence, you should keep your referenced rasters in a regular folder.

Article ID: 000027398

Software:
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 1 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options