# Enum Class FormatModifier

Object
Enum<FormatModifier>
FormatModifier

All Implemented Interfaces:
  `Serializable, Comparable<FormatModifier>, Constable`

public enum FormatModifier extends Enum<FormatModifier>
Characteristics of the GeoTIFF file to write. The modifiers can control, for example, the maximal size and number of images that can be stored in a TIFF file.

The modifiers can be specified as an option when opening the data store. For example for writing a BigTIFF file, the following code can be used:

    var file = Path.of("my_output_file.tiff");
    var connector = new StorageConnector(file);
    var modifiers = new FormatModifier[] {FormatModifier.BIG_TIFF};
    connector.setOption(FormatModifier.OPTION_KEY, modifiers);
    try (GeoTiffStore ds = new GeoTiffStore(null, connector)) {
        // Write data here.
    }

Since:
  1.5
See Also:
  - `GeoTiffStore​.getModifiers()`

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum​.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ANY_TILE_SIZE`
  Whether to allow the writing of tiles of any size.
  `BIG_TIFF`
  The Big TIFF extension (non-standard).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final OptionKey<FormatModifier[]>`
  `OPTION_KEY`
  The key for declaring GeoTIFF format modifiers at store creation time.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static FormatModifier`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static FormatModifier[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### BIG_TIFF

    public static final FormatModifier BIG_TIFF
    The Big TIFF extension (non-standard). When this modifier is absent (which is the default), the standard TIFF format as defined by Adobe is used. That standard uses the addressable space of 32-bits integers, which allows a maximal file size of about 4 GB. When the `BIG_TIFF` modifier is present, the addressable space of 64-bits integers is used. The BigTIFF format is non-standard and files written with this option may not be read by all TIFF readers.

  - ### ANY_TILE_SIZE

    public static final FormatModifier ANY_TILE_SIZE
    Whether to allow the writing of tiles of any size. The TIFF specification requires tile sizes to be multiples of 16 pixels. At reading time, Apache SIS always accept tiles of any size and this option is ignored. At writing time, by default Apache SIS checks the tile size and, if not compliant with TIFF requirement, reorganizes the pixel values in a new tiling before to write image. This reorganization may have a performance cost and consumes more disk space than needed. This option allows to disable this reorganization, which may result in smaller but non-standard TIFF files.

- ## Field Details

  - ### OPTION_KEY

    public static final OptionKey<FormatModifier[]> OPTION_KEY
    The key for declaring GeoTIFF format modifiers at store creation time. See class Javadoc for usage example.
    See Also:
      - `StorageConnector​.setOption(OptionKey, Object)`

- ## Method Details

  - ### values

    public static FormatModifier[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static FormatModifier valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null