RasterConsumer

Reads raster features for testing purposes, including any accumulated raster operations. No additional operations are performed, and nothing is done with the features.

Jump to Configuration

Typical Uses

  • Performance testing or benchmarking raster processing.
  • Debugging raster processing.
  • Testing raster feature validity.

How does it work?

The RasterConsumer receives raster features and reads all of their data at their current state in the workspace. It does not perform any new operations on the rasters.

FME handles rasters in a “delayed evaluation” model. A raster reader reads essential information about a raster, but does not read the actual cell contents until it is absolutely necessary. Transformer operations are accumulated until the results are needed, often being held until the features enter a writer. At that point, the required data is fully read and processed.

This is intended to optimize performance - for example, if a raster is both clipped and reprojected, FME will optimize processing by not reprojecting data that falls outside of the clip boundary and is ultimately discarded.

The RasterConsumer transformer forces this read to occur, and any accumulated operations are performed as the features are read. Nothing is done with the read features, and the transformer will not improve performance - it simply emulates the effect that reading the data would have, wherever it is placed.

It can be used to test workspace performance without configuring writers, and can also be useful for debugging raster processing workspaces with multiple accumulated operations. It may also be used for raster geometry validation, as it will reject any non-raster features.

This transformer is unaffected by raster band and palette selection.

Note: Though the transformer has parameters that can be used to adjust the way in which the raster is read (tiles), they are primarily of interest for internal Safe performance testing and are not generally useful in a production environment.

Examples

Usage Notes

  • The RasterCheckpointer similarly forces processing of any accumulated raster operations, but also writes the current state to a temporary disk file. It may be placed between raster transformers to potentially optimize processing performance and memory usage.
  • The Enable Feature Caching option in FME Workbench should be disabled to obtain more accurate processing benchmarks.

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

Note that the default parameter settings are generally used.

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.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

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 RasterConsumer on the FME Community.

 

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