Writer Overview
FME considers a dataset to be a folder name. The names of the TIFF output files written to the output dataset folder are determined from the FME Feature Type. The folder does not have to exist before the translation occurs. Any existing files in the folder which have the same name are overwritten with the new feature data. The TIFF writer distinguishes duplicate output files by appending numbers to the filenames. Please see About FME Rasters for details.
The TIFF writer has an option for setting the bit depth of the output file. The option is exposed as a feature type parameter “Number of Bits Per Cell” on the feature type level and as a feature attribute “tiff_number_of_bits_per_cell” on the feature level. The value can be set to a value between 1 and 32, or left empty. When a value is specified, the writer will behave as follows:
- The writer checks the interpretation of the input raster bands. The interpretation of the input raster bands must be the minimum power of 2 above the requested bit depth. For example, to write 7-bit data, the interpretation must be one of UINT8, GRAY8, RED8, GREEN8, BLUE8, or ALPHA8.
- The data values on the bands will be reduced to the number of bits specified in the option. Note that values outside the bounds of the bit depth will be capped to the minimum or maximum. For example, if the number of bits is set to 4, a value of 201 (1100 1001 in base 2) will become 15 (1111 in base 2) in the output file.
- The NoData value on the bands will not change. For example, a NoData value 201 will still be 201 in the output file whatever the number of bits is set to. The user can change the NoData value before writing it to the format using the nodata setter transformer.
- The values of the palettes on the input raster will not change, but the number of palette entries does change. The maximum number of palette entries depends on the number of bits in the option. For instance, if the original palette has 256 entries with keys 0 to 255 and the number of bits is set to 4, keys 16 to 255 will be removed and the output palette will only have keys 0 to 15.
Another option in the TIFF writer is the BigTIFF support. The option is exposed as a feature type parameter “Enable BigTIFF” on the feature type level and as a new feature attribute “tiff_enable_bigtiff” on the feature level. The value can be set to yes or no, or left empty. When the value is set to no or left empty, the writer functions as if this option does not exist. When the value is set to yes, the writer will produce a file with the BigTIFF file structure. Other applications are required to support BigTIFF in order to open the BigTIFF file, even if the file is less than 4GB.