Number of bits per sample.
Number of bits per sample. Should either be a multiple of 8, or evenly divide 8 (i.e. 1, 2 or 4).
ESRI compatibility changes the data we write out.
ESRI compatibility changes the data we write out. It results in some extra TIFF tags and many extra GeoTIFF tags.
Here we do a bunch of calculations around strip size.
Here we do a bunch of calculations around strip size. We limit each strip to 65K in size. Given that constraint, we can determine how many strips we need, how large each strip is, how many rows per strip we'll write, etc.
String nodata value to use in GeoTIFF metadata.
Int nodata value to use when writing raster.
The number of TIFF tags to be written.
The number of TIFF tags to be written.
If we update the writer to support additional TIFF tags this number needs to be increased also. The writeTag calls in write are numbered to help make this process easier.
The number of GeoTags to be written.
The number of GeoTags to be written.
If we write extra GeoTIFF tags this number needs to be increased.
Type of samples, using numeric constants from the TIFF spec.
Encodes the raster to GeoTIFF, and writes the data to the output stream.
Encodes the raster to GeoTIFF, and writes the data to the output stream.
This method does not return a result; the result is written into the output stream provided to Encoder's constructor. Many of the methods used by write mutate the object, and Encoder is not thread-safe, so it's important not to call this more than once.
Class for writing GeoTIFF data to a given DataOutputStream.
This class implements the basic TIFF spec [1] and also supports the GeoTIFF extension tags. It is not a general purpose TIFF encoder (in particular it always writes the data into a single strip) but should work well for encoding raster data.
In addition to using one strip it uses a single sample per pixel and encodes the data in one band. This means that files using more than 8-bit samples will often not render correctly in image programs like the Gimp. It also does not implement compression.
Future work may add compression options, as well as options related to the color palette, multiple bands, etc.
Encoders are not thread-safe and can only be used to write a single raster to single output stream.
[1] http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf