FME Transformers: 2024.1

Categories
Rasters
Related Transformers
RasterBandAdder
RasterBandPropertyExtractor

RasterBandNameSetter

Sets the band name of selected bands on a raster, making raster contents simpler to understand compared to band numbers.

Jump to Configuration

Typical Uses

  • Adding names to raster bands for processing requirements or clarity.

How does it work?

The RasterBandNameSetter receives raster features and applies either a single name or list of names to the currently selected band or bands.

To select specific bands, use the RasterSelector prior to the RasterBandNameSetter.

Lists of names must be provided as an FME list attribute.

This transformer supports raster band selection. Palettes are unaffected.

Using a List Attribute for List of Names

When the input type is a list (Input Type = List of Names), a list attribute that contains band names must be specified.

The values in the list will be applied to the selected bands, in the order they were selected. The list must contain at least as many elements as there are selected bands. List values are used sequentially.

List Examples

Given an input raster feature with three bands and no band names, this table shows the expected output for different combinations of selected bands against the same list attribute of band names.

List Attribute*

Selected Bands*
(bold)

Resulting Band Names

_bandnames{0} = 'OneDog'

_bandnames{1} = 'TwoCats'

_bandnames{2} = 'ThreeFish'

0

1

2

Band 0: OneDog

Band 1: TwoCats

Band 2: ThreeFish

0

1

2

Band 0: OneDog

Band 1:

Band 2:

0

1

2

Band 0: OneDog

Band 1:

Band 2: TwoCats

0

1

2

Band 0:

Band 1: OneDog

Band 2: TwoCats

*Band numbers start at zero (0), as do list elements. The band name list attribute may have any name.

Examples

Usage Notes

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  
History  

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 RasterBandNameSetter 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.