FME Transformers: 2024.2

Categories
Rasters
Related Transformers
PointCloudOnRasterComponentSetter
PointOnRasterValueExtractor
RasterAspectCalculator
RasterBandInterpretationCoercer
RasterBandKeeper
RasterBandNameSetter
RasterBandNodataRemover
RasterBandNodataSetter
RasterBandRemover
RasterCellCoercer
RasterCellValueCalculator
RasterCellValueReplacer
RasterCellValueRounder
RasterConvolver
RasterHillshader
RasterMosaicker
RasterPaletteAdder
RasterPaletteExtractor
RasterPaletteGenerator
RasterPaletteInterpretationCoercer
RasterPaletteNodataSetter
RasterPaletteRemover
RasterPaletteResolver
RasterSingularCellValueCalculator
RasterSlopeCalculator
RasterToPolygonCoercer
Scaler
VectorOnRasterOverlayer

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 colon). 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.

Selection String Syntax Change

As of FME 2021.2, the syntax used for band and palette selection strings is as documented above. Selection strings created with the previous format (as in previously-saved workspaces) are converted automatically.

Examples

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 combining raster with vector data.

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

Configuration

Input Ports

Output Ports

Parameters

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
Aliases RasterBandSelector, RasterPaletteSelector
History  

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

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

 

Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.