Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
S a f e S o f t w a r e I n c . F M E D e s k t o p T u t o r i a l
Safe Software Inc. makes no warranty either expressed or implied, including, but not limited to, any implied warranties of merchantability or fitness for a
particular purpose regarding these materials, and makes such materials available solely on an “as-is” basis.
In no event shall Safe Software Inc. be liable to anyone for special, collateral, incidental, or consequential damages in connection with or arising out of
purchase or use of these materials. The sole and exclusive liability of Safe Software Inc., regardless of the form or action, shall not exceed the purchase
price of the materials described herein.
This manual describes the functionality and use of the software at the time of publication. The software described herein, and the descriptions themselves,
are subject to change without notice.
Copyright
© 1994 – 2009 Safe Software Inc. All rights are reserved.
Revisions
Every effort has been made to ensure the accuracy of this document. Safe Software Inc. regrets any errors and omissions that may occur and would
appreciate being informed of any errors found. Safe Software Inc. will correct any such errors and omissions in a subsequent version, as feasible. Please
contact us at:
Safe Software Inc.
Suite 2017, 7445 – 132nd Street
Surrey, BC
Canada
V3W1J8
www.safe.com
Safe Software Inc. assumes no responsibility for any errors in this document or their consequences, and reserves the right to make improvements and
changes to this document without notice.
Trademarks
FME is a registered trademark of Safe Software Inc.
All brand or product names mentioned herein may be trademarks or registered trademarks of their respective holders and should be noted as such.
Documentation Information
Document Name: FME Desktop Tutorial
Version: FME 2010
Updated: December 2009
ii
S a f e S o f t w a r e I n c . F M E D e s k t o p T u t o r i a l
Contents
Chapter 1 Getting Started ................................................................................................................................... 1
In this chapter ............................................................................................................................................. 1
Installing FME .............................................................................................................................................. 1
Licensing FME .............................................................................................................................................. 1
Installing the FME sample dataset ................................................................................................................... 1
Getting help ................................................................................................................................................ 2
Contents iii
S a f e S o f t w a r e I n c . F M E D e s k t o p T u t o r i a l
Contents iv
S a f e S o f t w a r e I n c . F M E D e s k t o p T u t o r i a l
Chapter 1
Getting Started
Getting help
FME products include extensive, context-sensitive help. If
you require assistance with a tool or format, click the item
and press F1 to open the help system.
Chapter 2
2. Click File > Open Dataset, which opens the Select Dataset
• Objective
to View dialog shown next.
• Viewing data
• Overlaying data in different formats
• Inspecting raster data
Objective
You’ve received data in a variety of formats and you want
to familiarize yourself with that data using FME Universal
Viewer.
Fields that have a red background, as shown above,
are mandatory fields.
Viewing data
3. To specify the format of the file you want to read, do
one of the following:
FME Universal Viewer is a tool for visually inspecting
spatial datasets. In this exercise, you’ll use the Viewer to • Click in the Format field and start typing mapi. As
view geometry, attributes, and coordinate system you start typing, you see a filtered list, with
information of various datasets.
Chapter 2: Inspecting Data – FME Universal Viewer 3
S a f e S o f t w a r e I n c . F M E D e s k t o p T u t o r i a l
MapInfo TAB (MFAL) highlighted. Press Enter or click Click OK to accept this format, close the Reader
to select it. Gallery, and return to the Select Dataset to View
dialog.
• To open the Reader Gallery (shown next), click the
Browse button at the right of the Format field. 4. Click the Browse button for the Dataset field to open a
Scroll down the list of formats and select MapInfo file browser in which you select the TAB data to view.
TAB (MFAL). Browse to C:\FMEData\Data\Parks and select the file
city_parks.tab, shown next.
2. Click Close to close the Coord Sys Info dialog. Tip: By selecting the format before the dataset, you
see only those datasets that correspond to the
requested format. This narrows your search and
makes it quicker to find what you need.
Click OK again to load the data into the Viewer, which 1. Open Windows Explorer and browse to
should look similar to the image shown next. C:\FMEData\Data\Raster and select InteropolisCentre.png.
Drag this file onto the View window.
3. The InteropolisCentre.png dataset now sits on top of 5. The roads are there, but they’re difficult to see. Let’s
the other data you loaded earlier. You’re going to change the color of the roads to white and make the
move these other datasets on top of the raster image. line thicker so the roads are easier to see on the raster
image.
On the Viewspace, drag the globe icon next to the
MAPINFO (city_parks) dataset above the corresponding On the Viewspace, under the DGNV8 (MajorRoads)
globe icon for the PNGRASTER (InteropolisCentre) dataset, click next to Roads.
dataset.
On the Color dialog, click white and then click OK.
Now perform the same step to move the DGNV8
(MajorRoads) dataset above the PNGRASTER Click + next to Roads to open the folder and then
(Interopolis Centre) dataset. double-click Line.
Your Viewer should look similar to the following: At the right of the Drawing Styles dialog, notice that the
Line Style is highlighted. Click in the Thickness field,
which opens the list of choices. Click 2 and then click
OK.
6. Now the roads are easy to see, but you can’t make out
the road names. Let’s set the text to bold.
On the Viewspace, under the DGNV8 (MajorRoads)
dataset, click next to Labels and on the Color dialog,
click black, and then click OK.
Click + next to Labels to open the folder and then
double-click Text to open the Drawing Styles dialog.
At the right side of the dialog under Font, click your
font choice (for example, Tahoma), and then click the
checkbox next to Bold to enable it.
Click OK. You can now see the names of the roads
4. Let’s change the color of the parks. On the Viewspace, easier.
click the city_parks icon . The city parks and the major roads, with their names,
are now overlaid on the raster image. Your View
This action opens the Color dialog, where you click one
window should look similar to the image shown next.
of the green colors and then click OK.
The icon for this dataset and the parks showing over
the raster image are represented in the color you
selected.
Chapter 3
Running a quick translation Note: Some formats require that you specify an
output filename; whereas others, including Shape,
require an output folder.
The quickest way to get data from one format to another
is to use FME Universal Translator. It has a very simple
interface although you don’t have much control over the
translation. FME Universal Translator is used primarily for
uncomplicated translations.
At the Writer location, the Coordinate System field now 7. If the Information tool is not active, click and select
reads LL-83, shown next. a feature.
Look at the Information window. You see that the Coord
Sys field now shows LL83.
Chapter 4
Note: You can also use Workbench to create and use both
custom formats and custom transformers. Those topics
are not described in this tutorial.
Quick changes
Renaming attributes
Move through the tabs by clicking them.
To rename an attribute without opening the Edit Parameters
dialog, do one of the following: 2. Click the User Attributes tab to open that page and
enter new names as appropriate.
• Right-click the attribute name on your canvas and
select Rename. Tab through the fields to accept the default values
and complete the entries.
• Click the attribute name on your canvas and press
F2.
The tools introduced in chapter 2 and 3 provide a quick Under Recent Files, you see a list of the most recently
way to perform simple translations. However, when the opened workspace files.
schema or the geometry of the data changes, it’s best to
To stop this page from showing when you start
use Workbench to perform the translations. Workbench, clear the checkbox for Show the dialog on
startup, which is located at the bottom of the startup
This exercise uses Workbench to do the following:
page.
• Creating a translation (workspace)
For users who have chosen not to show the startup
• Using transformers page, when you start Workbench you see a blank
workspace. Open the startup page (at any time) by
Creating a translation (workspace) clicking File > New.
In the Dataset field click the Browse button to open the 5. Save your workspace and name it parcels.fmw.
file browser.
Your workspace should look similar to the following
Browse to the C:\FMEData\Data\Properties folder and figure. (In our example, the width of the Navigator was
double-click the parcel_L26.mif file to make this increased to show the full pathnames for the published
selection, close this dialog, and return to the New parameters.)
Workspace dialog.
Click in this field and type filter and press Enter to filter
the transformers and show the Search Results in the
Transformer Gallery.
Using transformers
Now that you have created a basic workspace, you can
begin manipulating the data.
3. You can connect this transformer to the source and For this exercise, select GeometryFilter : LINE and click
destination feature types in several ways, described OK.
earlier under the heading “Inserting transformer
The GeometryFilter is placed successfully between the
connections” on page 20. The instructions that follow
Reader and Writer feature types, and the LINE output
describe the Quick Insertion method.
port is connected to the Writer feature types, shown
Note: Make sure Workbench has the Enable/Disable next.
Drag and Insert Transformer feature enabled by clicking
on the Workbench toolbar. If it isn’t enabled, you
won’t see the pink dots and lines described in the
following steps. You can enable or discontinue quick
insertions at any time by clicking .
You can drop a transformer into place between two
previously connected feature types or transformers.
This time-saving feature lets you quickly place a
transformer without having to delete the existing
feature connection.
Click the GeometryFilter transformer on the canvas and
start dragging it upward. Notice the pink dot that
shows in the top left corner.
Keep dragging the transformer onto the feature
connection between the existing feature types. Release
the mouse button to drop the transformer into place. 4. The Properties button on the GeometryFilter is yellow,
which indicates the default values will be used, which
Because this transformer has multiple output ports, is fine for this exercise.
the Insert Transformer dialog, shown next, opens.
5. You’ll now add two more transformers. Let’s start by
adding an AreaBuilder transformer to turn the lines
into polygons.
Click on a blank area of your canvas.
6. Now let’s add a KMLStyler transformer to set the 8. On the KMLStyler Parameters dialog, shown next, you
polygon’s symbology, using a combination of Quick want to set the fill color. In the Color location, at the
Add and Insert functionalities. Fill Color field, click the Browse button.
On your canvas click the connection between the On the Select Color dialog, click the color red and click
AreaBuilder transformer and the destination feature OK.
type under Writer Feature Types, and start typing kml.
On the Quick Add dialog, select KMLStyler. The
transformer now is connected between the AreaBuilder
transformer and the destination feature type under
Writer Feature Types.
Your workspace should look similar to the following
image. (The objects were moved around to make it
easier to read what was on the canvas.)
11. On the canvas, right-click the destination feature type Intermediate Workbench tasks
under Writer Feature Types and select Visualize. On the
Select Dataset to View dialog, click OK to open this This exercise continues with the same workspace used in
dataset in the Viewer.
the Basic Workbench tasks.
The Viewer opens the destination dataset, which
should look similar to that shown in the next figure.
Processing multiple files
Notice that the line features from the original data are
replaced with polygon (area) features because of the 1. On the Navigator locate the source dataset (Source
action of the AreaBuilder transformer. MapInfo MIF/MID File) and double-click it to open the
Edit Published Parameter dialog, shown next.
2. Click Browse and select parcel_L26 through parcel_L29, Your dialog should look similar to the following image.
shown next.
Click OK.
Click Open to make the selection and to place this new
source dataset on the canvas.
4. Click to run the workspace.
Click OK to accept the list of selected feature types.
On the canvas, notice that the name of this dataset
3. Data that doesn’t have a matching feature type is has changed, shown next.
discarded. Therefore to accommodate L27, L28, and
L29 when only L26 is defined, you’ll set the merge
options.
Click the Properties button on the Reader feature type.
On the Feature Type Properties dialog at the Merge
Parameters location, click the checkbox in front of
Merge Feature Type to enable it.
In the Merge Filter field, type * meaning that you want
to let everything pass.
Click OK.
2. On the Select Feature Types dialog that opens, you’ll see Spatially Filtering the Data
a list of the different ways the data was captured and
put on different feature types. Now you’re going to add a Bufferer transformer to put a
Clear all checkboxes except House Address. 1000 foot buffer zone around the EPA sites. You’ll also add
a SpatialFilter transformer to identify properties within this
At the bottom of the dialog click the checkbox titled 1000 foot buffer.
Add also to writer. The Select Feature Types dialog should
look similar to the following: 1. On your workspace, use the Quick Add method to add
a Bufferer transformer to the canvas.
Open the Bufferer Parameters dialog and set the Buffer
Amount to 1000, shown next.
Click OK.
3. Drag the House Address reader you just created down Click OK.
the canvas. You can also rearrange the other objects
2. Next add a SpatialFilter transformer.
so it’s easier to see them.
On the SpatialFilter Parameters dialog, set the following
properties (shown next):
• Tests are INTERSECTS and WITHIN.
• Pass Criteria is Pass Against One Base.
On the canvas, connect the SpatialFilter PASSED The white circles indicate the EPA buffer zones we set.
output port to the LotParcels destination dataset’s
input port.
Delete the connection between the KMLStyler STYLED
output port and the LotParcels destination dataset.