3

I have a multi-band GeoTIFF with >10 bands, for example 11. I would have expected these to be shown in an ordered numerical sequence from 1 to 11. However, ArcCatalog 10.3.1 wants to show the string sorted list of bands:

Default

How can I fix this to make ArcCatalog sort bands by their band number?


One manual fix within ArcCatalog is to rename (e.g.) Band_1 to Band_01 by clicking each of these, repeating this until Band_09. But that's a lot of clicking and manual effort! And it adds a .aux.xml sidecar file (yuk!)

My other attempt to fix this is to use GDAL to set each band's Description metadata to Band_01, Band_02, ..., Band_11, which looks like this (via gdalinfo):

Band 1 Block=365x1 Type=Float64, ColorInterp=Gray
  Description = Band_01
Band 2 Block=365x1 Type=Float64, ColorInterp=Undefined
  Description = Band_02
...
Band 11 Block=365x1 Type=Float64, ColorInterp=Undefined
  Description = Band_11

ArcCatalog is now happy to sort every band, except for Band_1.

Attempt

Furthermore, ArcCatalog allows me to rename any band except for Band_1, so I can't change this name or sorting.

1

The issue appears to be when the band names are stored in GDAL metadata in the GeoTIFF rather than in the sidecar aux.xml. I don't know whether this is related to ArcGIS itself, or the really old (1.8 esri branch) version of GDAL that ArcGIS 10.3.1 ships with. I don't have a GDAL 1.8 intallation to test with

Workaround - force sidecar aux.xml PAM metadata file by creating your GeoTIFFs with the PROFILE=GeoTIFF creation option, not the default (which is PROFILE=GDALGeoTIFF), then set band names.

E.g

...
dst_ds = driver.Create( dst_filename, ncols, nrows, nbands, gdal_datatype, ['PROFILE=GEOTIFF'] )
...
for band in range(nbands):
    rb.SetDescription('B%s' % str(band+1).zfill(2))

gdalinfo c:\temp\test_f64.tif

    ...
Band 1 Block=512x1 Type=Float64, ColorInterp=Gray      
  Description = B01                                    
Band 2 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B02                                    
Band 3 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B03                                    
Band 4 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B04                                    
Band 5 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B05                                    
Band 6 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B06                                    
Band 7 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B07                                    
Band 8 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B08                                    
Band 9 Block=512x1 Type=Float64, ColorInterp=Undefined 
  Description = B09                                    
Band 10 Block=512x1 Type=Float64, ColorInterp=Undefined
  Description = B10                                    
Band 11 Block=512x1 Type=Float64, ColorInterp=Undefined
  Description = B11 

enter image description here

  • It seems this is just a quirk with ArcCatalog. The RGB composite is always correct (1, 2, 3), and ArcMap correctly shows the proper sorted list of bands in the Layer Properties dialog. Esri should fix ArcCatalog to be consistent with their other components. Nevertheless, this sidecar file fixes ArcCatalog's display, thanks! – Mike T Oct 5 '17 at 2:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.