## NAME

r.in.tiff - Imports a TIFF (8 or 24 bit) raster file into GRASS raster file(s).
(GRASS Raster Data Import Program)

## SYNOPSIS

r.in.tiff [-v] input=name output=name

## DESCRIPTION

This program imports a TIFF raster file (8 or 24 bit) to GRASS raster file(s). Output is placed in the /cell directory under the user's current GRASS mapset.

### Flag:

-v
  Verbose mode

### Parameters:

input=name
  Name of an existing TIFF raster file to be imported.
output=name
  Name to be assigned to resultant binary raster map layer.

The program prompts the user to enter the name of the TIFF raster file to be converted and the name to be assigned to the GRASS raster file to contain the resultant image. Currently "TIFF/uncompressed", "TIFF/PackBits-compression" and "TIFF/deflate" formats are supported. Other compression schemes may not be read correctly. LZW compression is not supported due to UNISYS patent.

If the image is a 24-bit RGB TIFF, then the output will be split into respective red, green and blue band files; each having the output name as its prefix followed by .r, .g or .b, respectively. Color composites can be displayed with d.rgb.

If a TIFF World file exists with an extension of "tfw", "tifw", "TFW", or "TIFW", it will be used to set the boundary coordinates and cell size. Rotation in the TIFF World file is not supported (second and third numbers), and if present the TIFF will be imported as an XY (unreferenced) image. If no TIFF World file exists, the user should adjust boundary coordinates stored in the cell header after import using r.support .

A sample TFW file opened up would look like:

                           6.00
                           0.00
                           0.00
                          -6.00
                     1709053.00
                      807714.00

             Line 1 - Cell size in the "X" direction
             Line 2 - "Rotation" term for the row
             Line 3 - "Rotation" term for the column
             Line 4 - Cell size in the "Y" direction
             Line 5 - Easting value of insertion point "X"
             Line 6 - Northing value of insertion point "Y"

Note: The y-scale (4) is negative because the origins of an image and a geographic coordinates system are different. The origin of an image is located in the upper-left corner, whereas the origin of the map coordinate system is located in the lower-left corner. Row values in the image increase from the origin downward, while y-coordinate values in the map increase from the origin upward.

## NOTE

This module only supports TIFF's conforming to the base TIFF 6 specification. These include monochrome, grayscale, palette and RGB ("True Color"), with at most 8 bits per "sample". Other features, like larger bits/sample, floating point (or rational) samples, alpha blending, transparency masks, and multiband images, are not currently handled.

This module also doesn't handle true GeoTIFF's (those with coordinate reference information actually embedded in the TIFF file). So the assumption with the TIFF world file is that it make sense in whatever coordinate system the current region settings return.

## SEE ALSO

r.support parser and r.out.tiff, r.in.gdal

## AUTHOR

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

GRASS 5.0 team

Last changed: $Date: 2002/05/10 08:06:07 $