Reader Directives

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

DATASET

Required/Optional: Required

This keyword’s value is the folder containing the GDMS files to be read.

Example:

GDMS_DATASET C:\Data\GDMS\Input

Workbench Parameter: Source Geographic Data Management System (GDMS) Folder

SYSTEM_UNITS

Required/Optional: Optional

This setting determines the scaling factor of coordinates within the GDMS files. All coordinates are multiplied by this value. The default value is 1.0.

Example:

GDMS_SYSTEM_UNITS 1000.0

X_OFFSET

This setting determines the X offset of coordinates within the GDMS files. This value is added to all X coordinates. The default value is 0.

Example:

GDMS_X_OFFSET 300.0

Y_OFFSET

This setting determines the Y offset of coordinates within the GDMS files. This value is added to all Y coordinates. The default value is 0.

Example:

GDMS_Y_OFFSET 300.0

DEF

Required/Optional

Required

The precise format of all three GDMS input file types must be specified on separate DEF lines before these files are read. These definition lines also provide the file names of each input file. The full path name of each file is determined by using the folder location from the DATASET keyword and the file name from the DEF line.

The syntax of the DEF lines depends on which file and record type it specifies. The first symbol of the DEF line indicates the further syntax and use of the rest of the DEF line as follows:

GDMS_DEF <definition type> …

Each definition type is given in the following table. Refer to Example Mapping File from GDMS to Shape for a list of attribute names and definitions for each definition type.

Definition Type

Use and Syntax

VERTICES_RECORD_1

This DEF line specifies the VERTICES file location and the format of the VERTICES record type 1.

The full syntax of this DEF line is:

<ReaderKeyword>_DEF VERTICES_RECORD_1    \

    GDMS_VERTICES_FILENAME <filename>    \

    [<attrName> <fieldType>]*

VERTICES_RECORD_N

This DEF line specifies the format of the VERTICES record type 2. The full syntax of this DEF line is:

<ReaderKeyword>_DEF VERTICES_RECORD_N    \

    [<attrName> <fieldType>]*

CROSSREF_RECORD

This DEF line specifies the CROSSREF file location and the format of the CROSSREF record. The full syntax of this DEF line is:

<ReaderKeyword>_DEF CROSSREF_RECORD      \

    GDMS_CROSSREF_FILENAME <filename>    \

    [<attrName> <fieldType>]*

TEXT_LAYER_HEADER

This DEF line specifies the TEXTDATA file location and the format of the TEXTDATA header record. The size of the header record is also explicitly given. The full syntax of this DEF line is:

<ReaderKeyword>_DEF TEXT_LAYER_HEADER    \

    GDMS_TEXT_LAYER_FILENAME <filename>  \

    GDMS_RECORD_SIZE <number of bytes>   \

    [<attrName> <fieldType>]*

TEXT_LAYER_TEXT

This DEF line specifies the format of the Text element record within the TEXTDATA file. The size of the record is also explicitly given. The full syntax of this DEF line is:

<ReaderKeyword>_DEF TEXT_LAYER_TEXT      \

    GDMS_RECORD_SIZE <number of bytes>   \

    [<attrName> <fieldType>]*

TEXT_LAYER_POLY

This DEF line specifies the format of the Polyline/Polygon element record within the TEXTDATA file. The size of the record is also explicitly given. The full syntax of this DEF line is:

<ReaderKeyword>_DEF TEXT_LAYER_POLY      \

    GDMS_RECORD_SIZE <number of bytes>   \

    [<attrName> <fieldType>]*

TEXT_LAYER_CIRCLE

This DEF line specifies the format of the Circle element record within the TEXTDATA file. The size of the record is also explicitly given. The full syntax of this DEF line is:

<ReaderKeyword>_DEF TEXT_LAYER_CIRCLE    \

    GDMS_RECORD_SIZE <number of bytes>   \

    [<attrName> <fieldType>]*

TEXT_LAYER_SYMBOL

This DEF line specifies the format of the Symbol element record within the TEXTDATA file. The size of the record is also explicitly given. The full syntax of this DEF line is:

<ReaderKeyword>_DEF TEXT_LAYER_SYMBOL    \

    GDMS_RECORD_SIZE <number of bytes>   \

    [<attrName> <fieldType>]*

<attrName> — The attribute names may be specified as anything, but note that for several of the DEF linetypes some reserved attribute names are expected somewhere within the line.

<fieldType> — The field types specify the exact length and byte location where each attribute is found within the record being defined. The interpretation of the primitive date type for this region of the record is also indicated by the field type. The following table gives the possible field types.

Tip: Tip: These types are the same as the ones available to the CAT type in the Relational Table Reader.

Field Type

Description

Integer(<width>, <position>)

Integer fields hold integer values stored in ASCII format.

The width parameter is the total number of bytes allocated to the field.

The position parameter is the starting byte of the field in the GDMS record. The bytes are numbered starting from 1.

Real(<width>, <position>)

Real fields hold floating point values stored in ASCII format.

The width parameter is the total number of bytes allocated to the field, including the decimal point.

The position parameter is the starting byte of the field in the GDMS record. The bytes are numbered starting from 1.

String(<width>, <position>)

String fields hold fixed length strings.

The width parameter is the number of bytes that the field holds. When a character field is retrieved, any padding blank bytes are stripped.

The position parameter is the starting byte of the field in the GDMS record. The bytes are numbered starting from 1.

BigEndian( <width>, 
<position>)

BigEndian fields hold integer values stored in big-endian binary format.

The width parameter is the total number of bytes allocated to the field. The only valid width values are:

1 to interpret the field as an 8 bit integer

2 to interpret the field as a 16 bit integer

4 to interpret the field as a 32 bit integer

The position parameter is the starting byte of the field in the GDMS record. The bytes are numbered starting from 1.

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