Skip to content

Latest commit

 

History

History
114 lines (63 loc) · 6.16 KB

4.01.KeyComponents.md

File metadata and controls

114 lines (63 loc) · 6.16 KB

Key Components

The list of key components in an FME translation is as follows:

  • Workspace
  • Readers
  • Writers
  • Feature Types
  • Features

It’s important to notice that all these components exist in a related hierarchy.

Hierarchy is an important concept because it affects how components are added to a translation, and - more importantly - how they are controlled.

######TIP This section covers “official” FME components only.

For example, it won’t cover any user-defined Python scripting that might be used to exert control over several workspaces.

However, it’s easy to look at this hierarchy diagram and imagine where such custom components might fit it.

Workspace

A workspace is the primary element in an FME translation and is responsible for storing a translation definition. A workspace is held as a file with an .fmw file extension. It can be run in either the Quick Translator or FME Workbench, but can only be opened for editing in Workbench.

Think of a workspace as the container for all the functionality of a translation.

Readers and Writers

A Reader is the FME term for the component in a translation that reads a source dataset. Likewise, a Writer is the component that writes to a destination dataset.

Each Reader and Writer in a workspace handles just a single format of data. To read or write multiple formats requires the use of multiple readers and/or writers.

It's important to note that Readers and Writers don’t appear as objects on the Workbench canvas.

Instead they are represented by entries in the Navigator window. Each reader and writer appears as a separate entry in the list.

Each item in the Navigator window is represented by an icon. The icons for readers and writers look like this:

The format of each reader and writer is denoted by the format keyword. In this example the reader format is GML, and the writer format is AutoCAD.

The “MySourceData” and “MyDestinationData” parts of the above screenshot are the names of the datasets being read/written.

It's possible for any one Reader to read multiple datasets and, when this is the case, each is listed, like in this AutoCAD reader.

NB: Because there are some important differences between functionality of Readers and Writers, we'll deal with them as separate items throughout this chapter of the training manual.

Feature Types

Feature Type is the FME term that describes a subset of records. Common alternatives for this term are 'layer,' 'table,' 'sheet,' 'feature class,' and 'object class.' For example, each layer in a DWG file is defined by a feature type in FME.

Feature Types are represented by objects in the Workbench canvas. The important part here is that each feature type belongs to a Reader or Writer defined in the Navigator window.

Therefore, when reading data, the Navigator window defines what dataset is being read, and the canvas objects define what layers are being read from that data. If a specific layer is not defined by a feature type, then that data will not be either read and/or written.

Don’t confuse the term ‘Feature Type’ with ‘Geometry Type.’

Feature Type means “layer;” Geometry Type means “lines,” “points,” “polygons.”

In this workspace, a Reader is reading a source dataset of roads, with a different layer for each road type.Notice the Reader in the Navigator window and how it has a list of feature types; then notice that each of these feature types is also depicted on the canvas:

In this workspace there are two Readers (one Esri Shape, one File Geodatabase). Each Reader has three different feature types.

Notice - and this is where is can be confusing - there is no visible connection between the Reader and its feature types, nor is it certain that feature types on the canvas will be organized in this way (though for Best Practice purposes they should be!)

Features

Features are the smallest single components of an FME translation.

They aren’t individually represented within a workspace, except by the feature counts on a completed translation.

Here 42 road features were translated.

One-To-Many Relationships

The hierarchical relationship between workspace, readers, writers, feature types, and features is always one-to-many (1:M) with the level beneath:

Notice how a single workspace can contain any number of readers and writers, each reader can contain a number of feature types, and each feature type can contain any number of features within it.

This means that a single workspace can read and write any number of different datasets and data types, each of which can have its own unique set of feature types. Each feature type will, usually, contain multiple features.

Managing Components

FME has a number of tools for managing components in an FME translation:

  • Create Workspace
  • Add Reader/Writer
  • Add Feature Types
  • Import Feature Types
  • Remove Reader/Writer
  • Remove Feature Types
  • Update Feature Types
  • Move Feature Types

Controlling Components

Each component has a set of settings that control how the component behaves when the translation is run. In FME terms we call these Parameters and, like transformers, each component has its own set of parameters that control its actions.

Now we know what these components are, let's look at each of them individually, in detail.