RasterSelector

Selects specific bands and palettes of a raster for subsequent transformer operations.

Jump to Configuration

Typical Uses

  • Isolating specific bands or palettes to perform operations on.

How does it work?

The RasterSelector receives raster features and designates specific bands and palettes as “selected.”

Once a selection is performed, transformers that support raster selection will only affect the selected bands and palettes. Unselected elements are passed through unaltered, and remain in an unselected state until another RasterSelector operation is performed.

The default state of a raster feature is that all bands and palettes are selected - that is, after reading in the raster, subsequent raster transformers will operate on all bands and palettes. Raster transformers may support both band and palette selection, band selection only, or may be unaffected by it. Check a transformer’s documentation for raster selection support details.

Bands and palettes are selected using the band and palette indices, specified in a string. The string may either be entered as a parameter or provided as an attribute.

Selection Strings

The format of the string is B P (band number, then palette number, separated by a space). If the raster does not have palettes, only band numbers should be specified.

  • Indices are zero-based, so the first band or palette is at index 0.
  • The keyword ALL can be used in place of band and palette numbers to select all bands or all palettes on a specific band.
  • Multiple bands or band-palette pairs are separated by a semicolon (;).
  • Multiple palettes on one band are separated by a comma (,).

Selection String Examples

All bands

ALL

All bands and all palettes

ALL ALL

First palette of the first band of a raster

0 0

First palette of the first band and first palette of the third band

0 0;2 0

First three bands of the raster (without palettes)

0;1;2

First three bands of the raster (with their palettes)

0 ALL;1 ALL;2 ALL

First two palettes on the first band

0 0,1

  • It is possible to select bands without selecting the attached palettes.
  • It is NOT possible to select palettes without selecting the owning band.
  • Specific palettes cannot be selected on ALL bands; for example, ALL 2.

Usage Notes

  • This function overrides any existing selection on the raster. All unspecified bands and palettes on a raster after selection are treated as unselected for future operations.
  • Selection is not considered by writers, so use the RasterBandSeparator and filtering to write subsets of the bands and palettes as individual features.

Choosing a Raster Transformer

FME has an extensive selection of transformers for working with raster data. They can be generally categorized as working with whole rasters, bands, cells or palettes, and those designed for workflow control or combing raster with vector data.

For information on raster geometry and properties, see Rasters (IFMERaster).

Configuration

Input Ports

Output Ports

Parameters

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
FME Licensing Level FME Professional Edition and above
Aliases RasterBandSelector, RasterPaletteSelector
History  
Categories

Rasters

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the RasterSelector on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver