data types in bands

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

data types in bands

Kyle Shannon
I just have a quick question about geotiffs that I couldn't find in the spec.  I am assuming that geotiffs do not support different data types for single bands within that file.  Is that correct?

Thanks.

#===================================
Kyle Shannon | 5775 Highway 10 W.
Physical Science Technician | Missoula, MT 59808
RMRS Fire Sciences Lab | (406)829-6954
Fire, Fuels & Smoke - RWU 4405 | [hidden email]
[hidden email] |
#===================================

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: data types in bands

Frank Warmerdam
Kyle Shannon wrote:
> I just have a quick question about geotiffs that I couldn't find in the
> spec.  I am assuming that geotiffs do not support different data types
> for single bands within that file.  Is that correct?

Kyle,

This is a TIFF rather than GeoTIFF issue. The TIFF BitsPerSample
tag has a value for each sample, so it is theoretically possible to
have different bitspersample values for different band data types.
However, this is not a baseline tiff, and would not be supported
by very many software packages in the world.  So I'd strongly
advise against doing this in most circumstances.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: data types in bands

Kyle Shannon
Thanks Frank,
We are changing our input file type from a proprietary type to a well supported/maintained data type.  GeoTiffs seemed the obvious choice.  Our files can have 3, 5, 6, or 8 bands.  Is there a way to specify a band is empty? We would like to keep the number of bands constant to allow user defined bands (bands 9 - n).  We were going to user a GDT_Byte for those bands to identify them as 'NoData'.  Is there a way to identify 'empty' bands in a geotiff, or is it even worth it to try?


#===================================
Kyle Shannon | 5775 Highway 10 W.
Physical Science Technician | Missoula, MT 59808
RMRS Fire Sciences Lab | (406)829-6954
Fire, Fuels & Smoke - RWU 4405 | [hidden email]
[hidden email] |
#===================================


On Mon, Jun 22, 2009 at 3:50 PM, Frank Warmerdam <[hidden email]> wrote:
Kyle Shannon wrote:
I just have a quick question about geotiffs that I couldn't find in the spec.  I am assuming that geotiffs do not support different data types for single bands within that file.  Is that correct?

Kyle,

This is a TIFF rather than GeoTIFF issue. The TIFF BitsPerSample
tag has a value for each sample, so it is theoretically possible to
have different bitspersample values for different band data types.
However, this is not a baseline tiff, and would not be supported
by very many software packages in the world.  So I'd strongly
advise against doing this in most circumstances.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: data types in bands

Frank Warmerdam
Kyle Shannon wrote:
> Thanks Frank,
> We are changing our input file type from a proprietary type to a well
> supported/maintained data type.  GeoTiffs seemed the obvious choice.  
> Our files can have 3, 5, 6, or 8 bands.  Is there a way to specify a
> band is empty? We would like to keep the number of bands constant to
> allow user defined bands (bands 9 - n).  We were going to user a
> GDT_Byte for those bands to identify them as 'NoData'.  Is there a way
> to identify 'empty' bands in a geotiff, or is it even worth it to try?

Kyle,

There is no standard way to indicate that a band is considered to be all
nodata.  Were you planning to store blank data for all the unused bands
on disk?

Further to my last message, I should add that libtiff and GDAL do not
support mixed data types in GeoTIFF.

If you were to store the data with PLANARCONFIG_SEPARATE, all zeros
for unused bands and a run length encoding compression like LZW the
unused bands would take very little space but would otherwise continue
to exist.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff