SpreadsheetPlotter
From Fmepedia
| This page contains a Custom Transformer created by an fmepedia user. See the attached files list at the foot of this page for the zip file containing this custom transformer. |
Created by: Mark Ireland
The SpreadsheetPlotter converts the attributes of a set of input features, into a table that can be used within a cartographic output. The attributes don't need to be defined in advance, the transformer works them all out for itself.
Typical uses would be to create a tabular list of feature attributes on a CAD drawing (for example pipeline diameters) or to add a title block to a map or drawing.
The user can set the origin of the text box, to place it within a certain location in a drawing. The origin used is the upper-left (not lower-left). There are no text size settings made available; I guess that can be done as an improvement (perhaps with a Scaler).
It can handle attribute values that are null, or which contain spaces (took a lot of work). However, be sure that all features have the same attributes, or at least that the first feature to enter the transformer contains all the attributes you require to be displayed.
FME Attributes (eg fme_color) and Multi-Dataset Attributes (eg multi_reader_id) will not be displayed, however format attributes that have been exposed will.
Attributes are listed in columns, by alphabetical order of the field name.
The transformer makes use of a TCL script that is included in the download. You will need to edit the TCLCallers in the transformer to point them to the correct location for the script (or can anyone think of a way to embed it within the transformer?)
The transformer also makes use of two other Custom Transformers; AttributeParity and FeatureMerger-1tomany. The download includes a workspace that generates sample data, plus all Custom Transformers embedded and exposed within it, so you won't have to download them separately.
This workspace was written over a long period and, even though it is annotated, I've forgotten a lot of the reasoning and subtleties within it. Feel free to try and improve on the design. Speed is adequate for what it is likely to be used for. The more features and attributes you input the longer it will take; FYI 100 features with 6 attributes takes 60 seconds on my - admittedly slow - system.
SpreadsheetPlotter: This example shows a road network, created from a CSV file, as seen in the FME Viewer with its attributes in a spreadsheetPlotter created table.
