[raster] External band numbers are capped to 1 - 256
|Reported by:||Bborie Park||Owned by:||Bborie Park|
|Priority:||medium||Milestone:||PostGIS Fund Me|
In looking at the code, the variable for the external band number is set to uint8_t. This is reflected by the serialized raster allocating 1 byte for the band number.
Having external band numbers set to 1 - 256 is a serious limitation considering external band data is processed through GDAL, which probably has a much higher limit.
The external band number variable should be at least uint16_t, which is the same as the number of bands variable for the raster object.
I don't know when this can be fixed as this affects the serialized raster format. The raster object does have a version flag so this fix could be introduced in PostGIS 2.1.