Understanding Feature Types and Attributes

Feature Type: The source dataset schema or structure.

Attributes: Information that belongs to a feature. There are user attributes and format attributes.

About Feature Types

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 FME Workbench help menu).

Some examples are:

  • In MicroStation Design File (DGN) format, each level is a Feature Type.
  • In AutoCAD Drawing File (DWG) format, each layer is a Feature Type.
  • In Smallworld format, each class is a Feature Type.
  • In Esri Shapefile format, each file basename (*.shp file) is a Feature Type.

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 User Attributes and Format Attributes

FME Workbench supports two types of attributes:

  • User attributes are custom attributes that hold domain information about a feature, such as parcel_identifier, owner_name, and date_surveyed. User attributes are always part of the feature no matter which format they are stored in, and hence persist when translating from one format to another. User attributes may come from a source dataset, or may be created as-needed within FME. Not all formats accept user attributes and the ones that do sometimes put restrictions on them. Each user attribute is defined by its name, data type, width, and number of decimal places.
  • Warning  Avoid naming user attributes with the prefix fme_. FME may not recognize a user attribute prefixed with fme_ because FME uses this prefix to process many format attributes. As well, to prevent similar conflicts, avoid naming user attributes with the same names as other format attributes.
  • Format attributes are specific to a format's schema. Some examples are: autocad_block_name and sde30_justification. They are not generically supported by FME and will change when translating to a different format. In general, format attributes are designed for translations to and from the same format, although advanced users may find them useful for writing to other formats when using customized workspaces.
  • A particular set of format attributes has the prefix fme_. These attributes represent the data as it is perceived by FME and are sometimes known as FME attributes or generic FME attributes.

Both user attributes and format attributes are most visible when viewing a dataset in the FME Data Inspector or Visual Preview.

Format Attribute Examples

Exposed and Unexposed Attributes

In the feature type dialog of a reader or writer, attributes can be Exposed, or made "visible."

Exposed attributes from a reader feature type become part of the workspace, which means you can access them in transformers and set them to particular values. By default, user attributes are exposed, because in most cases, you will be primarily interested in working with those attributes in a workspace. Format attributes are usually unexposed; however, for advanced users, exposing format attributes allows a variety of special things to be done with formats, such as setting line thickness, creating special entities, and setting particular bits or bytes. For more information, see Controlling Features with Format Attributes.

In addition to format attributes, unexposed attributes can originate from dynamic workflows or when working with JSON or XML data. For example, this article in the FME Community discusses how to deal with attributes that are unknown to the schema in a dynamic workflow. Some transformers, such as XMLFlattener, have settings to expose attributes.

When viewing attributes in the Feature Information window, exposed attributes show their FME Data Types; unexposed attributes do not.