Writer Directives

The directives that are processed by the MIF writer are listed below. The suffixes shown are prefixed by the current <WriterKeyword> in a mapping file. By default, the <WriterKeyword> for the MIF writer is MIF.

DATASET

Required/Optional: Required

The value for this keyword is the folder containing the MIF file(s) to be written.

Workbench Parameter: Destination MapInfo Folder

DEF

Required/Optional: Required

The MIF writer processes this directive as described in the Reader Directives section.

COORDSYS_STATEMENT

Required/Optional: Required

The value for this directive is the coordinate system statement that should be written to the header of the produced MIF files. Normally, FME examines the coordinate system information present on the features written to the MIF files, and generates a coordinate system statement based on this information. However, in certain circumstances it is necessary to override this and force a particular coordinate system to be output into the file. This is typically done to force the units of a non-earth projection to something other than the default, which are meters.

The syntax of this line is the same as the line defined for the CoordSys line in the MapInfo MIF/MID documentation. For example, to force a non-earth inches coordinate system, this line would be present in the mapping file:

MIF_COORDSYS_STATEMENT CoordSys NonEarth Units \”in\”

The FME appends bounds information to this statement when it is written to the MIF file. Notice that the quotes must be escaped, as they are required when the coordinate system statement is written to the MIF file.

Workbench Parameter: Coordinate System Statement

BOUNDS

This directive allows explicit setting of the bounds of the output features. Because MIF has limited precision available for the storage of coordinates, defining a tight bound on the range of the data can preserve more accuracy. When this directive is specified, the coordinate system string written to the top of the MIF file will contain this bounds specification. The syntax of this directive is:

MIF_BOUNDS<xmin> <ymin> <xmax> <ymax>

Workbench Parameter: Bounds Min X, Bounds Min Y, Bounds Max X, and Bounds Max Y

FILENAME_PREFIX

The value for this directive is prepended to every output file that is created by the writer.

For example, to have the word temp appear on the front of every file name, this line would be present in the mapping file:

MIF_FILENAME_PREFIX temp

WRITE_REGION_CENTROIDS

To direct the Writer to output calculate the region centroid and store the x and y values in the corresponding mif_centroid_x and mif_centroid_y format attributes. The Writer will only attempt to calculate the centroid values if the format attributes were not previously set. If neither the format attributes or this directive are set then no centroid value will be calculated. The syntax of this directive is:

WRITE_REGION_CENTROIDS yes

Workbench Parameter

Generate and Write Region Centroids

ENCODING

This directive is applicable only if you are working with foreign (non-English) character sets.

For example, if your data contains foreign characters, using this directive along with the encoding value ensures that the original characters are preserved.

Required/Optional

Optional

Values

Values supported by MapInfo 10:

SJIS, CP437, CP850, CP852, CP855, CP857, CP860, CP861, CP863, CP864, CP865, CP869, CP874, CP932, CP936, CP950, CP1250, CP1251, CP1253, CP1254, CP1255, CP1256, ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, ISO8859-7, ISO8859-8, ISO8859-9

Mapping File Syntax

<WriterKeyword>_ENCODING <encoding>

Workbench Parameter

Character Encoding (optional)

SEPARATOR_CHARACTER

The value of this directive is the character to be used as the delimiter. The default value is a comma, but another character may be specified.

Required/Optional

Required

Values

Comma(,), semicolon(;), vertical bar (|), space, tab, or other user-specified character

Mapping File Syntax

<WriterKeyword>_SEPARATOR <separator>

Workbench Parameter

Separator Character

QUOTE_ATTRIBUTE_VALUES

This directive specifies whether to surround the output attribute values in quotes. Choose Yes to always surround the attribute values in quotes, and choose No to surround them in quotes only when necessary. The default option is No.

Required/Optional

Required

Values

Yes/No

Mapping File Syntax

<WriterKeyword>_QUOTE_OUTPUT_VALUES <Yes/No>

Workbench Parameter

Quote Output Values

VERSION

This directive provides a hint of the target version of the output file.

This affects compatibility options for date fields. Specifically, versions 300 and 450 will treat date/time fields as strings instead.

Note that this option does not affect the overall version number written to the file. That is determined by the specific attribute types, geometry types, or coordinate systems. For example, if the coordinate system is “Krovak S-JTSK”, then the version is promoted to at least 900.

Required/Optional

Required

Values

300, 450, 900, 950, 1000, 1050, 1100, 1150

Mapping File Syntax

<WriterKeyword>_VERSION <version>

Workbench Parameter

File Version