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.
Input Ports
The vector features which will be rasterized onto the resultant raster.
The fme_color attribute of the input vector features is used to generate pixel values for color bands. Pixel values for red, green, and blue bands will be taken from the corresponding component of a feature's fme_color attribute. Pixel values for gray bands will be the average of the fme_color components.
Polygonal features may also optionally have an fme_fill_color attribute; in this case, the outer boundary will be drawn using fme_color and the inner area will be drawn using fme_fill_color.
Pixel values for alpha bands may be specified through the Alpha Value parameter.
The Z coordinates of the input vector features are used to generate pixel values for numeric bands.
The feature to use as the background raster of the resultant raster. This must be a raster feature or an error will occur.
Output Ports
The raster drawn from a group of features.
Parameters
Transformer
If the Group By parameter is set to an attribute list, one raster per group will be produced.
Note: How parallel processing works with FME: see About Parallel Processing for detailed information.
This parameter determines whether or not the transformer should perform the work across parallel processes. If it is enabled, a process will be launched for each group specified by the Group By parameter.
Parallel Processing Levels
For example, on a quad-core machine, minimal parallelism will result in two simultaneous FME processes. Extreme parallelism on an 8-core machine would result in 16 simultaneous processes.
You can experiment with this feature and view the information in the Windows Task Manager and the Workbench Log window.
No: This is the default behavior. Processing will only occur in this transformer once all input is present.
By Group: This transformer will process input groups in order. Changes of the value of the Group By parameter on the input stream will trigger batch processing on the currently accumulating group. This will improve overall speed if groups are large/complex, but could cause undesired behavior if input groups are not truly ordered. Specifically, on a two input-port transformer, "in order" means that an entire group must reach both ports before the next group reaches either port, for the transformer to work as expected. This may take careful consideration in a workspace, and should not be confused with both port's input streams being ordered individually, but not synchronously.
Using Ordered input can provide performance gains in some scenarios, however, it is not always preferable, or even possible. Consider the following when using it, with both one- and two-input transformers.
Single Datasets/Feature Types: Are generally the optimal candidates for Ordered processing. If you know that the dataset is correctly ordered by the Group By attribute, using Input is Ordered By can improve performance, depending on the size and complexity of the data.
If the input is coming from a database, using ORDER BY in a SQL statement to have the database pre-order the data can be an extremely effective way to improve performance. Consider using a Database Readers with a SQL statement, or the SQLCreator transformer.
Multiple Datasets/Feature Types: Since all features matching a Group By value need to arrive before any features (of any feature type or dataset) belonging to the next group, using Ordering with multiple feature types is more complicated than processing a single feature type.
Multiple feature types and features from multiple datasets will not generally naturally occur in the correct order.
One approach is to send all features through a Sorter, sorting on the expected Group By attribute. The Sorter is a feature-holding transformer, collecting all input features, performing the sort, and then releasing them all. They can then be sent through an appropriate filter (TestFilter, AttributeFilter, GeometryFilter, or others), which are not feature-holding, and will release the features one at a time to the transformer using Input is Ordered By, now in the expected order.
The processing overhead of sorting and filtering may negate the performance gains you will get from using Input is Ordered By. In this case, using Group By without using Input is Ordered By may be the equivalent and simpler approach.
In all cases when using Input is Ordered By, if you are not sure that the incoming features are properly ordered, they should be sorted (if a single feature type), or sorted and then filtered (for more than one feature or geometry type).
As with many scenarios, testing different approaches in your workspace with your data is the only definitive way to identify performance gains.
Alpha
This parameter specifies the alpha channel value (0-1) for the vector features.
If Composite Using Alpha Band is set to Yes, rasters will be expected to have an alpha band selected. Vector features will then be blended with the underlying raster according to their alpha values, rather than just overwriting the underlying raster.
Anti-Aliasing
If this parameter is Yes, the output lines will be smoothed using an anti-aliasing algorithm.
The Tolerance parameter is the maximum normalized distance from a line segment or polygon vertex to a pixel to be rendered. For example a tolerance of 1.0 will draw all pixels touched by the input vector line, while a tolerance of 0.0 will draw only those pixels where the input vector line passes directly through their center. Tolerance can only be selected when anti-aliasing is off.
Point Cloud
When drawing point clouds on color bands, the Input Component specifies which component of the point should be used to set the color of the raster pixel. If the parameter is set to Color, the points in the cloud must have a color component. If the parameter is set to Intensity, the points in the cloud must have an intensity component. The intensity component is converted to a color using a grayscale continuum, where the minimum intensity in the cloud is black and the maximum intensity in the cloud is white.
Attribute Accumulation
Merge Attributes
If Merge Vectors is chosen, attributes from all features will be merged, and in case of conflicts, the value of Conflict Resolution will be used. If Prefix Vectors is chosen, then all incoming attributes will be presented with a prefix set in Prefix parameter. If Only Use Vectors is chosen, only attributes from vectors will be used.
This parameter is enabled when Accumulation Mode is set to Merge Vectors. Use Raster and Use Vectors will give priority to the raster and vectors respectively in case of attribute conflicts.
The value is used as a prefix for holes when Accumulation Mode is Prefix Vectors.
Generate List
If you enter a list name in this field, then a list will be created on the output raster feature, containing an element for each input vector feature that overlapped the raster geometry, in order of appearance.
Note: List attributes are not accessible from the output schema in Workbench unless they are first processed using a transformer that operates on them, such as ListExploder or ListConcatenator. All list attribute transformers are displayed in the Contents pane of the Transformer Help under Lists. Alternatively, AttributeExposer can be used.
Usage Notes
This transformer supports raster band selection. The RasterSelector can be used to modify selection.
Aggregates are not supported by this transformer.
Related Transformers
To produce a new raster from inputted vector features, use the ImageRasterizer instead.
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.
Transformer Categories
FME Licensing Level
FME Professional edition and above
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.
Tags Keywords: raster grid band channel palette lookup LUT colormap colourmap vector rasterize convert digitize digitise nodata color colour visualize visualise overlay adjacent map algebra "point cloud" LiDAR sonar pointcloud