2

What are the valid values for "band" in a GeoTiff file?

I've looked through the Geotiff Spec at http://www.remotesensing.org/geotiff/spec/geotiffhome.html and I am having trouble finding information about multi-band imagery.

I'm looking for documentation that answers these questions:

  • Do the band values always start at 1?
  • Is band 0 a valid band?
  • What is the max band allowed?

I am looking at the Band information that is reported from running gdalinfo on a geotiff file.

Alex B
  • 2,246
  • 2
  • 16
  • 12
  • Are you worried about limits on the number of bands? Do you perhaps want a multidimensional array (say NetCDF or HDF format) rather than a GeoTIFF? Multiple bands are sometimes used to stored an "unrolled" array in a 2d raster (this is how GDAL will represent NetCDF/HDF and others), but it's not exactly ideal. You might want multiple attributes on a multidimensional array, and GIS formats are not generally suited to this. – mdsumner Nov 30 '10 at 23:42

1 Answers1

3

Do you mean the maximum number of bands? I don't think 0 is acceptable, simply by convention on the method GDAL uses to access bands.

The type for nBandId is int, so that would suggest that you could have about 2 billion bands in GDAL, but I'm not sure if GeoTIFF allows that as well.

Link

Glorfindel
  • 1,096
  • 2
  • 9
  • 14
mdsumner
  • 8,196
  • 1
  • 27
  • 30