FME Transformers: 2024.2

Categories
Rasters
Related Transformers
RasterToPolygonCoercer
SurfaceModeller

RasterCellCoercer

Creates individual points or polygons for each cell in a raster, optionally extracting band values as z coordinates or attributes.

Jump to Configuration

Typical Uses

  • Converting a raster to a vector grid of polygons
  • Converting a raster to regularly spaced points, either 2D or 3D
  • Creating an elevation grid
  • Preparing raster data for vector-based analysis

How does it work?

The RasterCellCoercer accepts raster input features. Depending on the choice of Output Cell Geometry - points or polygons - either a point is created at each cell origin, or a polygon is traced around the boundary of each cell.

Band values are extracted from each cell, and may be handled as either Attributes or Z Values.

If values are extracted as Attributes, they are added to a new list attribute on the output features, with one list item per band. If they are extracted as Z Values, they are assigned to the z coordinate of the output features, and they are output as 3D.

Multi-band rasters: If Z Values is used with a multi-band raster, duplicate geometry will be created for each band (which can greatly increase output size and processing time). Extracting values as Z Values is typically most appropriate for single-band numeric rasters or DEMs. If Attributes is chosen on a multi-band raster, the band values (usually representing red, green, blue, and possibly alpha values, in a range from 0 to 255) are added as list items. Color is not assigned to the output features, but may be extracted from this list attribute and assigned using a FeatureColorSetter.

Nodata values may be kept or discarded.

Input raster attributes may optionally be kept, including the Raster ID, Band ID, and source column and row position. As these options may increase processing time, by default they are not added.

This transformer supports raster band selection. The RasterSelector can be used to modify this selection.

When Extract Band Values is set to Z Values, each selected band must not contain a palette.

Examples

Usage Notes

  • This transformer can easily produce a very large number of vector features for each raster. For example a 1,000 x 1,000 RGBA image, fetched into the Z value, would produce four million point/polygon features. This can lead to the consumption of large amounts of system resources when carrying out transformation on the results, and result in writing very large output datasets.
  • Very large processing tasks may benefit from using a PointCloudCombiner and PointCloudToPointCoercer as an alternate workflow (for point output only).

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 GridPointExtractor, RasterPointExtractor, RasterToPointCoercer
History This transformer was previously known as the RasterToPointCoercer, RasterPointExtractor, or GridPointExtractor.

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