MapnikRasterizer
Draws input point, line, polygon, and raster features onto a raster using the Mapnik toolkit.
Mapnik divides features into groups called layers. Features in a layer should share the same geometry type. For each layer, one or more symbolizers will be defined; these represent a set of parameters that describe how to render the features. For example, a layer could be a set of lines representing country borders. This layer could then have two symbolizers -- one to draw the lines, and a second one to draw a "glow" surrounding the lines.
Input Ports
This transformer will have one input port for each layer. Layers are defined using the Inputs parameter.
Output Ports
The raster(s) drawn from a group of features.
Invalid features that will not be included in the output raster.
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.
Yes: This transformer will process input groups in order. Changes on 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.
No: This is the default behavior. Processing will only occur in this transformer once all input is present.
Rendering Rules
Defines the layers and symbolizers that specify how features will be rendered.
Each entry in the table contains an input port, a symbolizer type, and the parameters for that symbolizer. The symbolizer parameters depend on the symbolizer type. Descriptions of the parameters for each symbolizer may be found in the Mapnik documentation.
Note that layers will be rendered in the order they are specified. The first layer in this table will be rendered first (i.e. will appear below any subsequent layers).
This parameter specifies what defines a layer.
When set to Each rendering rule is a layer, each individual rule in the above table will be rendered as a separate layer.
When set to Each input port is a layer, each input port will be rendered as a layer. Note that some layers will contain multiple symbolizers in this case.
Essentially, this determines the draw order of the rendering rules. Layers are rendered in order, with all features for a layer drawn before any features of the next layer. Within a layer, symbolizers are applied feature-by-feature.
Example: You have line features representing streets, and each feature also contains an attribute specifying the street name. To render this, you could set up a Line symbolizer and a Text symbolizer. In this case, you would want to draw all the streets first, then have all the labels on top of those, so Each rendering rule is a layer would be more appropriate.
Example: You have overlapping polygons, and want to draw each with a border. To render this, you could set up a Polygon symbolizer and a Line symbolizer. In this case, you would want to draw each feature as both a polygon and a line before moving on to the next feature, so Each input port is a layer would be more appropriate.
Note that the behavior of Each rendering rule is a layer can be replicated when Layer Definition is set to Each input port is a layer. To do this, just add a new input port for each separate layer.
Raster Properties
To set the size of the output raster, specify either the dimensions or the cell size.
To set the output raster size using dimensions, set the Size Specification to Columns and Rows and specify values for both the Number of Columns and Number of Rows.
To set the output raster size using spacing, set the Size Specification to Spacing and specify a value for Cell Spacing.
This specifies how many cell columns there are in the output raster. This parameter is used when the Size Specification is Columns and Rows.
This specifies how many cell rows there are in the output raster. This parameter is used when the Size Specification is Columns and Rows.
This parameter specifies the width of the output raster cells, measured in ground units. This parameter is used when the Size Specification is Spacing.
This parameter sets the interpretation of the output raster.
Background
The background may be filled with a solid color and/or image. If neither a color nor image is specified, the background will be transparent.
The Color parameter sets the background color.
Click the colored square to the right of the text field, or edit the contents of the field directly. The color must be specified as <red>,<green>,<blue> where each of <red>, <green>, and <blue> is a number between 0 and 1.
The Color Alpha Value parameter sets the alpha value for the background color. It must be a number between 0 and 1.
This parameter specifies an image file that should be used as the background for the raster.
Ground Extents
If the Ground Extents parameter is set to Use input data ground extents, the output raster extents will be determined by the union of the bounding boxes of the valid input vector features.
If the Ground Extents parameter is set to Specify ground extents, the remaining Ground Extents parameters are used to specify the extents of the output raster.
Note that the output raster extents may not be equal to the specified extents if the raster size was specified by the number of rows and columns. This is because the x and y spacing must be equal (i.e. (Maximum X - Minimum X) / Number of Columns must be equal to (Maximum Y - Minimum Y) / Number of Rows). If they are not, the extents may be enlarged in one dimension.
This specifies the minimum x value of the output raster. It is used when the Ground Extents parameter is set to Specify ground extents.
This specifies the minimum y value of the output raster. It is used when the Ground Extents parameter is set to Specify ground extents.
This specifies the maximum x value of the output raster. It is used when the Ground Extents parameter is set to Specify ground extents.
This specifies the maximum y value of the output raster. It is used when the Ground Extents parameter is set to Specify ground extents.
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: minimum bounding rectangle MBR fme_colour rasteriser