VectorOnRasterOverlayer

From fmepedia

VectorOnRasterOverlayer is a Workbench Transformer.


Table of contents



Description

This factory takes any number of vector features and overlays them onto a single raster feature. The properties of the output raster are identical to that of the input raster.


Examples

These example are three workspaces, which add vector layers to a raster. The workspaces and source datasets (CONTOURS.ffs, INDEX_CONTOURS.ffs, and building-footprints.ffs) are attached to this page (see below).


Example 1

The first workspace (ContoursOnRaster.fmw) adds two layers of contours - regular and index contours. The workspace simply sets colors for each layer, and the sends all the features to VectorOnRasterOverlayer. Anti-aliasing is set to 'yes' as it seems to be a better option for long, smooth and curvy features such as contours:


Example 2

The second workspace (BuildingsOnRaster.fmw) splits area features into two layers - areas themselves and area outline - this way we can set separate colors for the boundary and the interior of areas. Besides, anti-aliasing is set not used (set to 'no), and this enables setting tolerance parameter, which controls how many pixels should be rendered depending on their relative position to an overlapping vector feature. Zero tolerance should render less pixels than tolerances 0.5 or 1, what means slightly smaller rasterized feature size. This way we can add area outlines without having fill colors squeezing outside - we set 0 tolerance for areas, and 0.5 for their outlines. For this we need two separate VectorOnRasterOverlayers:


Example 3

The third workspace (TwoLayersOnRaster.fmw)combines the two previous workspaces. It has three VectorOnRasterOverlayers with unique parameter combination in each:

If parameters can be the same for all layers (SameParameters.fmw), then there might be a need in sorting features before sending them to the VectorOnRasterOverlayer. Use AttributeCreator for each vector layer, set some numbers, and send all the features to the Sorter transformer. Lower numbers will be rendered first, hence go below the higher numbers.

Attached Files
filesizedate
BuildingsOnRaster.fmw36.5 kB08/19/09
BuildingsOnRaster.jpg155.3 kB08/19/09
ContoursOnRaster.fmw30.0 kB08/19/09
ContoursOnRaster.jpg176.8 kB08/19/09
SameParameters.fmw48.1 kB08/19/09
SourceData.zip36.5 MB08/19/09
TwoLayersOnRaster.fmw45.8 kB08/19/09
TwoLayersOnRaster.jpg171.8 kB08/19/09
User Comments Add a new comment