Reader Directives

The suffixes listed are prefixed by the current <ReaderKeyword> in a mapping file. By default, the <ReaderKeyword> for the FFS reader is FFS.

DATASET

The value for this directive is the folder containing the FFS files to be read or a single FFS file.

Required/Optional

Required

Mapping File Syntax

A typical mapping file fragment specifying an input FFS dataset looks like:

FFS_DATASET /usr/data/ffs/92i080

The dataset may also be an actual FFS file. In such a case, that file is read, and the IDs and DEF lines must not be present.

FFS_DATASET /usr/data/data/92i080.ffs

Workbench Parameter

Source FME Feature Store (FFS) File(s)

DEF

This specification is used to define FFS files read. The syntax of the DEF directive is:

            <ReaderKeyword>_DEF <baseName>
 [<attrName> <attrType>]+

Note: This directive is not used when the dataset is a file.

Required/Optional

Optional

Mapping File Syntax

The example below defines a roads FFS file for input during a translation:

FFS_IDs roads

The following table shows the attribute types supported.

Field Type

Description

char(<width>)

Character fields store fixed length strings. The width parameter controls the maximum number of characters that can be stored by the field. No padding is required for strings shorter than this width.

varchar(<width>)

Variable character fields store variable length strings. The width parameter controls the maximum number of characters that can be stored by the field. These are often used to optimize storage.

buffer

Buffers store unbounded length character or byte strings.

date

Date fields store dates as character strings with the format YYYYMMDD.

datetime

Datetime fields store dates as character strings with the format YYYYMMDDHHMMSS.FFF

time

Time fields store times as character strings with the format HHMMSS.FFF

number(<width>,
<decimals>)

Number fields store single and double precision floating point values. The width parameter is the total number of characters allocated to the field, including the decimal point. The decimals parameter controls the precision of the data and is the number of digits to the right of the decimal.

real64

Float fields store 64 bit floating point values. There is no ability to specify the precision and width of the field.

real32

Float fields store 32 bit floating point values. There is no ability to specify the precision and width of the field.

int16

Int16 fields store 16 bit signed integers and therefore have a range of -32767 to 32767.

int32

Int32 fields store 32 bit signed integers and therefore have a range of -2147483648 to 2147483647.

logical

Logical fields store TRUE/FALSE data. Data read or written from and to such fields must always have a value of either true or false. Another name for this field type is Boolean.

IDs

This specification is used to limit the available and defined FFS files read. The syntax of the IDs directive is:

<ReaderKeyword>_IDs <baseName1> \
<baseName2> … \
<baseNameN>

The base names must match those used in DEF lines.

Required/Optional

Optional

Mapping File Syntax

The example below selects only the roads FFS file for input during a translation:

FFS_IDs roads

Note: This directive is not used when the dataset was a file. Also note that if IDs are specified, only those files whose IDs were listed will be read. If no IDs and no DEF lines were present, then all the files in the folder will be read.

Workbench Parameter

Feature Types to Read

PASSPHRASE

This specification is used to decrypt the source dataset.

This passphrase must exactly match the passphrase that was used to encrypt the dataset when it was created.

Mapping File Syntax

<ReaderKeyword>_PASSPHRASE <character string>

This must only be used if the FFS files being read were encrypted when they were created.

Required/Optional

Required only when input is encrypted

Workbench Parameter

Password

SEARCH_CLOSEST_POINT

This specification is used to restrict the returned features to the closest feature in each FFS file to some search point. This directive can only be used if the FFS files being read were created with spatial indexes.

The mm parameter indicates the maximum distance a feature can be away from a point before it will be returned. Distances are calculated to the boundaries of area-based features.

Required/Optional

Optional

Mapping File Syntax

The syntax of this directive is:

<ReaderKeyword>_SEARCH_CLOSEST_POINT <x> <y> <maxdist>

Workbench Parameter

Closest Search Point

ENFORCE_SECONDARY_FILE_NAMES

The FFS writer has the capability to split one output file into multiple segments and store each segment in a “spillover file”(<filename>_1.ffs, <filename>_2.ffs, etc...). See MAX_FILE_SIZE writer directive.

However, someone could also have three separate FFS files with the same names as the spillover files. This directive is used to differentiate between the two situations.

Required/Optional

Optional

Values

YES (default) | NO

If the files are spillover files, then this directive should be set to YES. If the files are individual files, then this directive should be set to NO. If the files are individual files, but the directive is set to YES, the features in the spillover files may be read duplicate times.

Mapping File Syntax

<ReaderKeyword>_ENFORCE_SECONDARY_FILE_NAMES YES

SEARCH_ENVELOPE

Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that interact with the bounding box are returned.

If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY>

Note: If all four coordinates of the search envelope are specified as zero, the search envelope will be disabled.

Required/Optional

Optional

Workbench Parameter

Minimum X, Minimum Y, Maximum X, Maximum Y

SEARCH_ENVELOPE_COORDINATE_SYSTEM

This directive specifies the coordinate system of the search envelope if it is different than the coordinate system of the data.

The COORDINATE_SYSTEM directive, which specifies the coordinate system associated with the data to be read, must always be set if the SEARCH_ENVELOPE_COORDINATE_SYSTEM directive is set.

If this directive is set, the minimum and maximum points of the search envelope are reprojected from the SEARCH_ENVELOPE_COORDINATE_SYSTEM to the reader COORDINATE_SYSTEM prior to applying the envelope.

Required/Optional

Optional

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE_COORDINATE_SYSTEM <coordinate system>

Workbench Parameter

Search Envelope Coordinate System

CLIP_TO_ENVELOPE

This directive specifies whether or not FME should clip features to the envelope specified in the SEARCH_ENVELOPE directive.

Values

YES | NO (default)

Mapping File Syntax

<ReaderKeyword>_CLIP_TO_ENVELOPE [yes | no]

Workbench Parameter

Clip To Envelope

EXPOSED_ATTRS

This directive allows the selection of format attributes to be explicitly added to the reader feature type.

This is similar to exposing format attributes on a reader feature type once it has been generated; however, it is even more powerful because it enables schema-driven applications other than Workbench to access and leverage these attributes as if they were explicitly on the schema as user attributes.

The result of picking a list of attributes is a comma-separated list of attribute names and types that will be added to the schema features. Currently all reader feature types will receive the same set of additional schema attributes for a given instance of the reader.

Required/Optional

Optional

Mapping File Syntax

Not applicable.

While it is possible for FME Objects applications to invoke this directive, the required format is not documented.

This directive is intended for use in our GUI applications (for example, Workbench) only.

Workbench Parameter

Additional Attributes to Expose