# Rasters (IFMERaster)

A raster geometry is a grid of values organized into rows and columns. Each row and column intersection in the grid is called a cell or pixel.

Rasters may represent image or numeric data. Images are commonly derived from satellite data or photography, while numeric data often represents elevations, temperatures, and other quantitative information.

Raster data is stored in one or more bands (also known as channels or layers). A band stores a single value at each cell. For example:

• Digital Elevation Model (DEM) rasters have a single band representing elevation.
• Image rasters commonly have three bands representing the red, green, and blue values that combine to form a color .
• Multispectral rasters may have many bands representing a wide range of spectral data.

Each band may optionally have one or more palettes (also known as colormaps or look-up tables). A palette is essentially a lookup from a key to a value.

## Raster Properties

Raster properties describe the raster as a whole. These properties include:

• Number of rows and columns
• Origin
• Spacing (cell size)
• Rotation
• Cell origin
• Ground Control Points (GCPs)

The raster origin is the upper left corner of the raster.

Spacing or cell size is the fixed distance in the x and y dimensions between each pixel in the raster. Some formats store only one spacing value, meaning that it must be the same for both the x and y dimensions – this is often referred to as square cells.

Rotation is used to represent rasters that are not aligned with the x and y axes. The x rotation is the angle in radians as measured in a counter clockwise direction from the positive x axis. The y rotation is the angle in radians as measured in a counter clockwise direction from the negative y axis. Note that a different rotation from the x and y axes produces a shear. The rotation point is the raster origin.

Together the origin, spacing, and rotation form an affine transformation.

Cell origin is the point within each cell of a raster from which the pixel for that cell is derived. The lower left corner of the cell in the x or y dimension is 0.0, while the upper right corner is 1.0. A cell origin of 0.5 in x and 0.5 in y would put the data point for each cell in the center of the cell, which is the default representation in FME.

Ground Control Points, or GCPs, may also be present in the geometry of a raster. If present, these refer to a set of points used to georeference image or elevation data, with each point 'tying' a row and column location in the raster to an x,y location on the earth. A coordinate system will also be present in the properties of a raster containing GCPs, as opposed to being stored on the feature itself. GCPs can either be applied to the raster resulting in the image being georeferenced and tagged with the GCP coordinate system, or the GCPs can be extracted and stored on the resulting data file for those formats supporting unreferenced data and GCP storage.

## Band Properties

Band properties describe one band on a raster. These properties include:

• Name
• Interpretation
• Nodata value

The interpretation of a band describes the type of data and number of bits stored at each cell. Possible interpretation values are Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Real32, Real64, Red8, Red16, Green8, Green16, Blue8, Blue16, Alpha8, Alpha16, Gray8, Gray16. Note that the color interpretations (Red8, and others) are stored using unsigned integer types.

Some bands may designate a special "nodata" value. Cells whose value is equal to the nodata value are considered to be unknown or invalid data. Note that a second option for identifying unknown or invalid data is a separate band that acts as a flag for each cell, indicating whether the data is valid or not. Several formats do not support nodata.

## Palette Properties

Palette properties describe one palette on a band. These properties include:

• Name
• Interpretation

Interpretation on palettes works in much the same way as it does on bands. The interpretation of a palette key must match the interpretation of the related band. Valid palette key interpretations are UInt8, UInt16, and UInt32. The palette value interpretation may be a color model such as RGB or RGBA or string data. Valid palette value interpretations are RGB24, RGBA32, RGB48, RGBA64, Gray8, Gray16, and String.

Palettes do not directly store nodata values. However, since the palette keys are intended to match the band values, a single palette key can be interpreted as nodata if it matches the band nodata value. This nodata key also looks up to a palette value, which is then considered the nodata value.

### Raster Attributes

• fme_geometry = fme_aggregate
• fme_type = fme_raster