Transformer Comparisons
Spatial Transformers
Choosing a Spatial Transformer
Many transformers can assess spatial relationships and perform spatial joins - analyzing topology, merging attributes, and sometimes modifying geometry. Generally, choosing the one that is most specific to the task you need to accomplish will provide the optimal performance results. If there is more than one way to do it (which is frequently the case), time spent on performance testing alternate methods may be worthwhile.
To correctly analyze spatial relationships, all features should be in the same coordinate system. The Reprojector may be useful for reprojecting features within the workspace.
Transformer |
Can Merge Attributes |
Alters Geometry |
Counts Related Features |
Creates List |
Supported Types* |
Recommended For |
---|---|---|---|---|---|---|
SpatialFilter | Yes | No | No | No |
|
|
SpatialRelator | Yes | No | Yes | Yes |
|
|
AreaOnAreaOverlayer | Yes | Yes | Yes | Yes |
|
|
LineOnAreaOverlayer | Yes | Yes | Yes | Yes |
|
|
LineOnLineOverlayer | Yes | Yes | Yes | Yes |
|
|
PointOnAreaOverlayer | Yes | No | Yes | Yes |
|
|
PointOnLineOverlayer | Yes | Yes | Yes | Yes |
|
|
PointOnPointOverlayer | Yes | No | Yes | Yes |
|
|
Intersector | Yes | Yes | Yes | Yes |
|
|
Clipper | Yes | Yes | No | No |
|
|
NeighborFinder | Yes | In some cases | No | Yes |
|
|
TopologyBuilder | Yes | Yes | No | Yes |
|
|
* NOTE: Curve includes Lines, Arcs, and Paths. Area includes Polygons, Donuts, and Ellipses.
Spatial analysis can be processing-intensive, particularly when a large number of features are involved. If you would like to tune the performance of your workspace, this is a good place to start.
When there are multiple ways to configure a workspace to reach the same goal, it is often best to choose the transformer most specifically suited to your task. As an example, when comparing address points to building polygons, there are a few ways to approach it.
The first example, using a SpatialFilter to test whether or not points fall inside polygons, produces the correct result. But the SpatialFilter is a fairly complex transformer, able to test for multiple conditions and accept a wide range of geometry types. It isn’t optimized for the specific spatial relationship we are analyzing here.
With a SpatialFilter:
The second example uses a PointOnAreaOverlayer, followed by a Tester. The features output are the same as in the first method, but the transformer is optimized for this specific task. The difference in processing time is substantial - from 54.3 seconds in the first configuration, down to 13.7 seconds in the second one.
With a PointOnAreaOverlayer and a Tester:
If performance is an issue in your workspace, look for alternative methods, guided by geometry.
Feature Joining
Choosing a Feature Joining Method
Many transformers can perform data joining based on matching attributes, expressions and/or geometry. When choosing one for a specific joining task, considerations include the complexity of the join, data format, indexing, conflict handling, and desired results. Some transformers use SQL syntax, and some access external databases directly. They may or may not support list attribute reading and creation.
Generally, choosing the one that is most specific to the task you need to accomplish will provide the optimal performance results. If there is more than one way to do it (which is frequently the case), time spent on performance testing alternate methods may be worthwhile. Performance may vary greatly depending on the existence of key indexes when reading external tables (as opposed to features already in the workspace).
Transformer |
Match By |
Uses SQL Statements |
Can Create List |
Input Type |
Notable |
Description |
---|---|---|---|---|---|---|
FeatureJoiner | Attributes | No | No | Features |
|
Joins features by combining the attributes and/or geometry of features based on common key attribute values. Performs the equivalent of Inner, Left, and Full SQL joins. |
FeatureMerger | Attributes | No | Yes | Features |
|
Merges the attributes and/or geometry of one set of features onto another set of features, based on matching key attribute values and expressions. |
ListBasedFeatureMerger | List Attribute to Single Attribute | No | Yes | Features |
|
Merges the attributes and/or geometry of one set of features onto another set of features, based on matching list attribute values with key attribute values and expressions. |
InlineQuerier | SQL query | Yes | No | Features |
|
Creates a set of SQLite database tables from incoming features, executes SQL queries against them, and outputs the results as features. |
SQLCreator | SQL query | Yes | No | External DB |
|
Generates FME features from the results of a SQL query executed once against a database. One FME feature is created for each row of the results of the SQL query. |
SQLExecutor | SQL query | Yes | No | External DB |
|
Executes SQL queries against a database. One query is issued to the database for each initiating feature that enters the transformer. Both the initiating features and the results of the query may be output as features. |
DatabaseJoiner | Attributes | No | Yes | External DB and Features |
|
Joins attributes from an external table to features already in a workspace, based on a common key or keys. SQL knowledge not required. Non-blocking transformer. |
Matcher | Geometry and/or Attributes | No | Yes | Features |
|
Detects features that are matches of each other. Features are declared to match when they have matching geometry, matching attribute values, or both. A list of attributes which must differ between the features may also be specified. If matching on attributes only (not geometry), using the FeatureMerger or another method will give better performance. |
Raster Transformers
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 combing raster with vector data.
Working with Rasters
RasterCellOriginSetter | Sets the raster's cell origin. |
RasterConvolver |
Accepts input features containing a raster geometry and outputs the features after applying a convolution filter to all the bands. Convolution filters are applied using a kernel, specified by a matrix of weights for the neighboring values, over all the cells of an input raster geometry. Such filtering is used for smoothing, sharpening, enhancing edges and other raster image manipulation operations. |
RasterExpressionEvaluator | Evaluates expressions on each cell in a raster, such as algebraic operations or conditional statements. |
RasterExtentsCoercer | Replaces the geometry of input raster features with a polygon covering the extents of the raster. |
RasterGCPExtractor | Extracts the coordinate system and the Ground Control Points (GCP) from the raster feature and exposes them as attributes. |
RasterGCPSetter | Sets the Ground Control Points (GCP) on a raster with the specified Column (pixel), Row (line), X Coordinate, Y Coordinate and Z Coordinate. |
RasterGeoreferencer | Georeferences a raster using the specified parameters. |
RasterHillshader | Generates a shaded relief effect, useful for visualizing terrain. |
RasterInterpretationCoercer |
Alters the underlying interpretation of the bands of the raster geometry on the input features, using the specified conversion options. For example, an input raster feature with three bands of interpretation (UInt16, Gray8, and Real64) could be converted to a raster feature with three bands of interpretation (Red8, Green8, and Blue8) or four bands of interpretation (Red16, Green16, Blue16, and Alpha16) in a single operation. |
RasterMosaicker | Merges multiple raster features into a single raster feature. |
RasterPropertyExtractor | Extracts the geometry properties of a raster feature and exposes them as attributes. |
RasterPyramider | Creates a series of pyramid levels for each input raster feature by specifying either the smallest pyramid level size or the number of pyramid levels to generate. Pyramid levels are created by resampling input rasters to various different resolutions. |
RasterResampler | Resamples an input raster using the desired dimensions, the desired cell size in ground units, or a percentage of the size. |
RasterRotationApplier |
Applies the raster rotation angle on the input raster properties to the rest of the raster properties and data values. The expected input is a raster with a non-zero rotation angle and the expected output is a rotated raster with a rotation angle of 0.0. It is expected that the input raster properties will be modified to conform the output raster properties for a raster rotated by the given angle. Applying a rotation angle is primarily done for compatibility with other processing and writers that cannot handle a rotation angle. |
RasterSubsetter | Clips raster features using pixel bounds instead of ground coordinates, and optionally adds cells around the perimeter. |
RasterTiler | Splits each input raster into a series of tiles by specifying either a tile size in cells/pixels or the number of tiles. |
RasterToPolygonCoercer | Creates polygons from input raster features. One polygon is output for each contiguous area of pixels with the same value in the input raster. |
WebMapTiler | Creates a series of image tiles that can be utilized by web mapping applications such as Bing™ Maps, Google Maps™, or Web Map Tile Service. This is done by resampling rasters to various different resolutions and then splitting them into tiles. |
Working with Bands
RasterBandAdder | Adds a new band to a raster. The added band will have the same value in all cells, and the same raster-level properties as other bands in the raster (that is, number of rows/columns, cell spacing, cell origin, and so on). |
RasterBandCombiner | Merges multiple overlapping raster features into a single raster feature. It accepts a number of input raster features, each of which has one or more bands. The bands are removed from the input features and appended to a single output raster feature. |
RasterBandInterpretationCoercer |
Alters the underlying interpretation of the selected bands of the raster geometry on the input features, using the specified conversion options. For example, an input raster feature with a single band of interpretation UInt8 could be converted to a single band of Gray8 or UInt16 data. |
RasterBandKeeper |
Removes all bands of a raster, except for those that are selected. The RasterSelector can be used to modify the selection. If all bands in the source raster are selected, the raster will remain unchanged. |
RasterBandMinMaxExtractor | Extracts the band minimum and maximum values, palette minimum and maximum keys and palette minimum and maximum values of a raster feature and exposes them as attributes. |
RasterBandNameSetter | Sets the name of selected bands on a raster. |
RasterBandNodataRemover | Removes the existing nodata identifier from the selected bands of a raster feature. That is, any values that were previously equal to the nodata value will now be considered valid data. |
RasterBandNodataSetter | Identifies a value to act as a nodata identifier on a raster feature at the band level. That is, values equal to the specified value will now be considered invalid, and will not be affected by many operations (for example, offsetting or scaling). |
RasterBandOrderer | Specifies the order of bands in a raster. Bands are reordered according to the input band indices. |
RasterBandPropertyExtractor | Extracts the band and palette properties of a raster feature and exposes them as attributes. |
RasterBandRemover | Removes the selected band(s) of a raster. To modify the selection, see the RasterSelector. |
RasterBandSeparator | Separates the bands and palettes from each input raster feature into one or more output raster features based on the number of input bands and palettes. |
RasterStatisticsCalculator | Calculates statistics on raster bands and exposes them as attributes. Bands with palettes are valid. |
Working with Cells
RasterAspectCalculator |
Calculates the aspect (direction of slope) for each cell of a raster. Aspect is measured in degrees from 0 to 360, starting clockwise from the north. Each selected input band will be converted to a Real64 band with output values that represent the aspect. If an input band does not have a nodata value, the output band nodata value will be set to -1. |
RasterCellCoercer | Decomposes all input numeric raster features into individual points or polygons. One vector feature is output for each cell in the band. |
RasterCellValueCalculator | Performs an arithmetic operation on a pair of rasters. |
RasterCellValueReplacer | Replaces a range of values in the source raster with a new single value. |
RasterCellValueRounder | Rounds off raster cell values. |
RasterSingularCellValueCalculator | Performs an arithmetic operation on two operands: the cell values of a raster and a numeric value. |
RasterSlopeCalculator | Calculates the slope (maximum rate of change in z) for each cell of a raster. |
Working with Palettes
RasterPaletteAdder |
Creates a palette from an attribute, and adds this palette to all selected bands on a raster. Selected bands are required to have an interpretation of UINT8, UINT16, or UINT32. Note that palette entries will be discarded if they do not fit within the interpretation of a selected band. For example, when adding a palette to a UINT8 band, all keys that are greater than 255 will be dropped. |
RasterPaletteExtractor | Creates a string representation of an existing palette and saves it to an attribute. |
RasterPaletteGenerator | Generates a palette out of the selected band(s) of a raster. The output raster will have the selected band(s) replaced by a new band with a palette. |
RasterPaletteInterpretationCoercer |
Alters the underlying interpretation of the palettes of the raster geometry on the input features, using the specified conversion options. For example, an input raster feature with a single band with a single palette of interpretation RGB24 could be converted to a single band with a single palette of RGB64 or String data. |
RasterPaletteNodataSetter |
Identifies the nodata value on a raster feature at the palette level. The transformer will succeed in setting the specified nodata value only if the input raster band(s) have at least one palette and a nodata key has already been set on the band. |
RasterPaletteRemover | Removes the selected palette(s) of a raster. The palette's band retains the palette key, but the corresponding values are lost. |
RasterPaletteResolver | Resolves the palettes of the selected bands of the input raster features by using the band cell values to look up the corresponding palette values, which then replace the original band cell values in the raster. |
Workflow Control
RasterCheckpointer | Sets a checkpoint in the raster processing which forces previous processing to occur immediately. Once complete, it saves the current state to disk. |
RasterConsumer | Requests the tile(s) from the raster geometry but no actual operations are performed on the tile(s). |
RasterExtractor | Serializes the geometry of the feature into the Blob Attribute based on the selected writer format. |
RasterNumericCreator | Creates a feature with a raster of the specified size with a numeric value and sends it into the workspace for processing. It is useful for creating a very large image with a user-specified width and height. |
RasterReplacer | Replaces the geometry of the feature with the geometry held in the Blob Attribute. The blob is decoded according to the selected raster format. |
RasterRGBCreator | Creates a feature with a raster of the specified size with an RGB value and sends it into the workspace for processing. |
RasterSelector |
Selects specific bands and palettes of a raster for subsequent transformer operations. The bands and palettes are selected using the band and palette indices, specified in a string. The string may either be specified explicitly or through an attribute. The format of the string is B P (separated with a space), where B is the band index and P is the palette index of the band and palette to be operated on. Indices are zero-based, so the first band or palette is at index 0. |
Vectors and Rasters
ImageRasterizer | Draws input point, line and polygon features onto a color raster filled with the background color. The fme_color attribute of the input vector features is used to generate pixel values. Features without an fme_color attribute will be discarded. |
NumericRasterizer | Draws input point, line and polygon features onto a numeric raster filled with the background value. The Z coordinates of the input vector features are used to generate pixel values. Features without Z coordinates will be discarded. |
MapnikRasterizer | Draws input point, line, polygon, and raster features onto a raster using the Mapnik toolkit. |
PointOnRasterValueExtractor | Extracts the band and palette values from a raster at the location of each input point and sets them as attributes on the feature. |
VectorOnRasterOverlayer | Overlays vector features onto a single raster feature by drawing them onto the resulting output raster. The properties of the output raster are identical to that of the input raster. |
asdf