Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
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 Answer 1

up vote 3 down vote accepted

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.

http://www.gdal.org/classGDALDataset.html#d96adcf07f2979ad176e37a7f8638fb6

share|improve this answer
1  
I created a 40K band GeoTIFF with rgdal, so I know at least it's not limited to 32768 :) –  mdsumner Dec 1 '10 at 1:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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