MapnikRasterizer

Generates a raster from input vector and raster features, with fine control over symbolization and labeling, using the Mapnik toolkit.

Jump to Configuration

Typical Uses

  • Creating cartographic renderings of vector features or vector on raster features

How does it work?

The MapnikRasterizer provides an interface to the Mapnik toolkit. It receives vector and/or raster input features and renders them as a raster image using cartographic styles based on the parameters selections.

When placed in the workspace, a MapnikRasterizer has one input port, Connect Input. Features may be connected to this port, which creates a new input port for each item connected there. Multiple feature input feature streams may be connected to one input port, if they are to receive the same styling, and are the same geometry type - for example, connecting several types of roads to a single Roads port.

The parameters dialog contains a table of Rendering Rules. Each Rule is composed of an Input Port, a Symbolizer, and Style. Multiple Rules may be created for one input port - for example, a Boundaries layer might be entered three times - once to style the lines, again to add a glow behind them, and again to create and style labels from an attribute.

A variety of Symbolizers are available, including line, point, and polygon styles and patterning, text, shields, and point markers, as well as rasters. Each type has associated style choices. For many styling options, conditional values are permitted, where a table of test conditions may be created to assign varying values - colors or line widths, for example.

Layers will be drawn in the order they appear in the Rendering Rules table - that is, the first item will be drawn first (at the bottom of the image), and subsequent items rendered over top of previous items. Ordering will determine how objects that overlap will appear - later items may cover earlier items.

Note: Full symbolization details are available in the Mapnik documentation.

Output rasters may be sized by defining their dimensions (number of columns and rows) or by specifying pixel size in ground units (horizontally and vertically). The ground extents covered by the raster default to the extent of all the input features, but can be specified. If specified extents are smaller than the extent of the data, it will be clipped to the defined area.

Raster Interpretation Type may be either RGB24 or RGBA32 (with alpha). The background of the raster can be either a specified color, or an image to be tiled over the extent of the raster. To use a georeferenced raster as the entire background, it should be connected to an input port and styled using the Rendering Rules and a Raster symbolizer (not attached as the Background Image).

Examples

Usage Notes

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

Group-Based

Feature Holding

Yes

Dependencies None
Aliases  
History  

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

 

Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.