Setting up the MapText Labeller

The MapText Labeller transformer creates an internal map view based on the features that are passed in via the transformer’s input connections. The transformer defines the map’s neatline (map boundary) by computing the minimum bounding rectangle around all of the features that are passed into it.  For purposes of label placement, MapText Labeller needs to know the line width of line features and area feature boundaries and the point symbols for point features.  If this information is not explicitly attached to incoming features, then style defaults are used.  To attach a feature style to all features in an input connection, use the MapText Styler transformer.

The following shows an example instance of a MapText Labeller transformer with two input connections (also called map layers).

In this case, the map is composed of features in the points layer and the road layer.  

The MapText Labeller automatically de-aggregates features and attempts to label the individual pieces.  For more control over how labeling of aggregates is done, it is recommended that aggregates are split apart and possibly recombined in separate transformers prior to being fed into the MapText Labeller.  This additional processing can be performed using transformers such as the Deaggregator and AreaAmalgamator.

To label a map, additional configuration is needed that drives the labeling.  To provide this configuration, open the transformer’s properties dialog to show the following:

Target Format

In order for the Labeller to accurately place the labels, it needs to know the actual physical height and length of each character in each label to properly fit the text on the map.  Each display system implements its own algorithm for determining the physical height and width of each rendered character based on its user-specified font size.  Because of this, it’s important to tell the Labeller the Target Format property whose renderer uses the display algorithm that matches the renderer of the application in which the placed labels will be viewed. For example, if the labels will be viewed in ArcGIS Pro, then choose ESRI ArcGIS for the Target Format.  

There are special considerations to note for certain Target Format applications:

  • Bentley MicroStation Design - If colors are set within the MapText Labeller, the MicroStation writer will try to select the closest color from the seed file. To set colors properly, the desired font number from the seed file can be used for the Index Color parameter in the DGNStyler.

    TrueType fonts should be specified in the seed file, since MapText Labeller only uses this type of font. The FME igds_font format attribute must be set to the font number from the seed file. The igds_font attribute can be set using an AttributeCreator, ValueMapper or another suitable transformer.

  • ESRI ArcGIS - Configured colors will not be properly assigned to shields and leaders (fme_color/fme_fill_color doesn't work). It is also not possible to write composite leaders to an ArcGIS Writer (a leader that is an aggregate of a polyline and filled polygon).

  • GeoMedia - Configured colors will not be properly assigned to shields and leaders (fme_color/fme_fill_color doesn't work).  It is necessary to manually set the nominal scale and scaling to Paper in the GeoMedia workspace.

Ground Units Per Font Point

Labeller also needs to know the map scale at which to place the labels.  This is defined by the Ground Units Per Font Point parameter.  The following describes one way to compute this value:

Ground Units Per Font Point = scale / (72 *groundUnitsPerInch) 

For example, if a map is to be labeled at a scale of 1:12000 and the units of the map are in meters, then since groundUnitsPerInch is 39.37meters/in and scale is 12000, then Ground Units Per Font Point would be 4.23.

Prefer Source Feature Color

The color of each output label is defined in its label style (more about this in a moment).  However, if one wants to override this, and instead assign each placed label’s color based on its parent feature, if the parent feature possesses a color, then check the Prefer Source Feature Color checkbox.

Rule Configurations

Each input connection (map layer) is shown in the Rule Configurations table.  New layers can be added by either clicking the Import button and choosing a Reader or by connecting a Reader or the output of a transformer to the Connect Input port of the Labeller transformer.  When the output of a transformer is connected to the Connect Port of the Labeller, a new map layer is created in the Rule Configurations with a default name.  One can click on the default name and change it to a user-configured name.  This will cause the line connecting the transformer output to the Labeller to be removed and show the map layer in red; however, at this point, the transformer’s output can be dragged again to the newly named map layer input port.  One can also add a new layer using the + button found below the Rule Configurations table which will add a new row and enable the user to enter the map layer name and its set of attributes to include.  This will create a new import port on the Labeller to which Readers or output of transformers can be connected.  The - button found below the Rule Configurations enables a user to remove a map layer which will also remove it as an input port.  A dot inside a row’s Labeled cell indicates whether a label definition has been configured for that row’s map layer.

To configure a label definition and a placement rule for each map layer that is to be labeled, click the Configure button to bring up the Label Manager.  The bulk of the labeling configuration occurs in the Label Manager.  Let’s explore the Label Manager in the next section to learn how to configure each label definition and a placement rule for placing labels built by each definition.