You are here: FME Workbench > Understanding Feature Types and Attributes

Understanding Feature Types and Attributes

Feature Type: the source dataset schema or structure.

Attributes: can reference either user attributes or format attributes.

About Feature Types

In FME, a Feature Type refers to the source dataset schema or structure.

Every format used by FME identifies features through a classification scheme. This classification is known in FME as a feature type. Feature types are used to differentiate between different types of features (for example roads, rivers, buildings, contours).

The feature type for any particular format is listed in the FME Readers and Writers manual under the "Format Quick Facts" section  (see FME Readers and Writers Reference under the Workbench help menu).

Some examples are:

A Feature Type is contained within a dataset.

When you create a workspace using a dataset, the Feature Types present in that dataset are shown on the left-hand side of the workspace canvas:

About Attributes

Workbench supports two types of attributes:

Format Attributes

A format attribute is a built-in, FME-generated attribute that relates to the structure or symbology of a feature for any given format. For example, a format attribute records a feature’s color.

You can use these attributes to carry out certain tasks by making the attributes part of the workspace.

Format attributes are most visible when viewing a dataset with the Inspector (FME Data Inspector). When querying a feature, not only will user attributes be shown, but so too will format attributes. In this case, the attributes reflect the nature of the data in its source form.

More Format Attribute Examples

The color of a feature is the simplest example of a format attribute. However, there are many more, all of which vary in their degree of complexity. Some examples of format attributes include the following.

Mapping Attributes from Reader to Writer

A particular set of Format Attributes has the prefix fme_. These attributes represent the data as it is perceived by FME. They are sometimes known as FME Attributes or Generic FME Attributes.

During a translation, the following occurs:

FME converts from one format to another without having to separately map the source data's format attributes directly to the destination format's attributes for every format. FME converts everything to an FME standard, and then converts it again to the writer format.

Data Type Mapping

Different formats support different data types. Even when two formats support the same data type, it is often represented by a different name. In this situation, FME must decide how to map attributes between data types.

FME's enhanced data model supports the mapping of data types in a manner that is similar to the mapping of attributes described above. A metafile for the reader format instructs FME how to map its attribute data types to the FME model, and a second metafile instructs FME how to map its model types to the destination schema.

For example, consider the data type mappings for MapInfo and Oracle data:

MapInfo Data Type FME Data Type
char(width) fme_char(width)
date fme_date
decimal(width,decimal) fme_decimal(width,decimal)
float fme_real64
integer fme_int32
logical fme_boolean
smallint fme_int16

 

Oracle Data Type FME Data Type
char(width) fme_char(width)
float fme_real32
number(width,decimal) fme_decimal(width,decimal)
double fme_real64
integer fme_int32
logical fme_boolean
smallint fme_int16

These mappings show that a MapInfo decimal data type attribute becomes an fme_decimal in the FME data model, which then becomes a number data type when written to Oracle.