Reader Directives

The following paragraphs contain the directives processed by the APT reader. The suffixes shown are prefixed by the current <ReaderKeyword> in a mapping file. By default, the <ReaderKeyword> for the APT reader is APT.

DATASET

Required/Optional: Required

Contains the folder name of the input APT files. The value for this keyword is the file path of the APT file to be read. A typical mapping file fragment specifying an input APT dataset looks like:

APT_DATASET /usr/data/apt/aptfile.apt

Workbench Parameter: Source APT File(s)

DEF

Required/Optional

Optional

This keyword defines the APT file, and each APT file must be defined before it can be read. The definition specifies the base name of the file, and the names and the types of all attributes. The syntax of a APT DEF line is:

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

The basename specified on the APT DEF lines is constructed by using either the file name without the extension specified by the DATASET keyword, or using apt_record (used only when APT is the source).

APT files require at least one attribute to be defined. The attribute definition given must match the definition of the file being read. If it does not, translation is halted and the true definition of the APT file’s attributes gets logged to the log file.

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.

date

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

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.

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.

The following mapping file fragment defines a APT file DEF line when APT is the source file format.

APT_DEF apt_record \
	apt_ival char(254) \
	apt_jval char(254) \
	apt_kval char(254) 

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