FME Transformers: 2024.2

Categories
Cartography and Reports
Rasters
Related Transformers
ImageRasterizer
NumericRasterizer
RasterNumericCreator
RasterRGBCreator
VectorOnRasterOverlayer

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

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Group-Based

Feature Holding

Yes

Dependencies None
Aliases  
History  

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

Search for all results about the MapnikRasterizer on the FME Community.

 

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