Reader Directives

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

DATASET

Required/Optional: Required

The value for this keyword is the file path of the DES file to be read.

Example:

DES_DATASET /usr/data/des/desfile.des

Workbench Parameter: Source DES File(s)

DEF

Required/Optional

Required

Each DES 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 DES DEF line is:

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

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

DES 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 DES 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 DES file DEF line when DES is the source file format.

DES_DEF des_record \
	des_headerinfo char(254) \
	des_featinfo char(254) \
	des_featnum number(11,0) \
	des_headertype char(50) \
	des_headnum number(11,0) \
	des_num char(10) \
	des_units char(10) \
	des_info char(20) \
	des_feattype char(20) \
	des_code number(11,0) \
	des_coordnum number(11,0) \
	des_idx number(11,0) \
	des_feat number(11,0) \
	des_ival char(254) \
	des_jval char(254) \
	des_kval char(254) 

The example below is a DEF line for the trees DBF file that has the attributes name and id_number:

DBF_DEF trees \
	name char(30) \
		id_number number(11,0)

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