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 turned off.

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 PointCloudCoercer 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

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
FME Licensing Level FME Professional Edition and above
Aliases GridPointExtractor, RasterPointExtractor, RasterToPointCoercer
History This transformer was previously known as the RasterToPointCoercer, RasterPointExtractor, or GridPointExtractor.

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

 

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