Viewing the Example

User-added image
Sample PDF file returned.

This example is set up and running on Safe's FME Server demo site. There are no installation requirements other than a standard web browser.

You can try it out by clicking the link below, selecting a index tile from the choice list and then clicking run. The PDF map will be generated and then you can click on a tile in the index map to generate a PDF of another area or even an overview map of all the tiles. Try turning a few of the layers off or viewing the attributes of a feature using the Layer and Model Tree sidebars in Adobe Reader.

Run it live    Configure and run it live

How It Works

User-added image
A screenshot of the workspace used.

As with most FME Server scenarios, a Spatial ETL process (workspace) is designed using FME Desktop (Workbench) and uploaded to FME Server.

The workspace reads municipal data from a number of layers, restructures the content and outputs PDF format data. The workspace also provides an option to restrict the display to an individual city tile or an entire city grid. In addition, a clickable city grid index map is provided with links to re-run the workspace for a different city tile. When published to FME Server it is registered with the Data Streaming service.

When the workspace is run from the FME Server Web User Interface it returns PDF format data directly to Adobe Reader. Clicking on one of the city grid index map links will re-run the workspace for the specified city tile.

Workspace

The workspace used to generate the PDF output has this content:

    1. Selecting the area of interest, clipping the data and styling for PDF (center workflow):
  • the municipal data is read,
  • the value of a choice type published parameter is used to test for and find the city tile of interest,
  • the other data is clipped to this tile,
  • the data is styled for PDF and then routed to output feature types.
    2. Clickable index map (top workflow):
  • the entire city grid is scaled and positioned within the PDF page using page units (1/72 of an inch),
  • the links to re-run the workspace are added along with tooltips,
  • the data is styled for PDF and routed to an output feature type.
    3. Ancillary text (bottom workflow):
  • text features are created and positioned within the PDF page using page units (1/72 of an inch),
  • a link to re-run the workspace with all city tiles is added along with a tooltip,
  • the data is styled for PDF and routed to an output feature type.


Setting up the Example

To actually set up and run the example on your own FME Server installation requires a certain set of software and setup.


Requirements

  • Adobe Reader 9
  • FME Server 2010
  • FME Desktop 2010
  • FME Sample Data Set
  • Zip file containing the files for this example

Steps

  • Download the zip file containing the files for this example and unzip it.
  • Open the 'D005-PDFMapping.fmw' workspace in FME Desktop 2010.
  • If you plan to publish this workspace to a remote computer, then do the following:
    • Change the links (in the Concatenator and AttributeCreator transformers) to point from localhost to the remote host name.
    • Change the InteropolisDatabase source dataset path so that it uses a path that is accessible to the remote computer.
  • Publish the D005-PDFMapping.fmw workspace into a repository named Demos and register it with the Data Streaming service.
    • Note: uncheck the option to upload the InteropolisDatabase if it is checked on.

Running the Example

  • Open the FME Server web interface, click the Services tab, expand the Data Streaming Service, expand the 'Demos' repository, click the Configure button '005-PDFMapping.fmw' workspace.
  • On the configure page: use the Tile Name parameter's ellipsis button to select a tile name and click the Run button.
  • The workspace will run and the PDF file will be opened in Adobe Reader.
  • The PDF contains a city grid index map that you can click in order to re-run the workspace for a different tile and provides a new PDF file. There is also a link to view an overview of the full city grid, which also re-runs the workspace and provides a new PDF file at a smaller scale.