Writer Directives
The directives that are processed by the MAPINFO writer are listed below. The suffixes shown are prefixed by the current <WriterKeyword> in a mapping file. By default, the <WriterKeyword> for the MapInfo writer is MAPINFO.
The MapInfo writer processes the DATASET and DEF keywords as described in the Reader Directives section. It also uses some additional directives:
DATASET
Required/Optional: Required
Contains the folder name of the output MapInfo files.
Workbench Parameter: Destination Folder
DEF
Required/Optional: Required
Defines a MapInfo file. The definition contains the file’s base name (without any of the extensions), and the definitions of the attributes. There may be many DEF lines, one for each file to be written.
COORDSYS_STATEMENT
Required/Optional: Optional
The value for this directive is the coordinate system statement that should be used in the produced MapInfo files. Normally, FME examines the coordinate system information present on the features written to the files, and outputs the coordinate system based on this information. However, in certain circumstances it is necessary to override this and force a particular coordinate system to be output. This is typically done to force the units of a non-earth projection to something other than the default, which is metres.
The syntax of this line is the same as that 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:
MAPINFO_COORDSYS_STATEMENT CoordSys NonEarth Units \"in\"
Notice that the quotes must be escaped, as they are required when the coordinate system statement is interpreted by the MapInfo Writer.
Workbench Parameter: Coordinate System Statement
BOUNDS
Required/Optional: Optional
This directive allows explicit setting of the bounds of the output features. Because MapInfo has limited precision available for the storage of coordinates, defining a tight bound on the range of the data can preserve more accuracy. The syntax of this directive is:
MAPINFO_BOUNDS<xmin> <ymin> <xmax> <ymax>
Workbench Parameter: Bounds Min X, Bounds Min Y, Bounds Max X, Bounds Max Y
BUILD_OPTIMAL_SPATIAL_INDEX
Required/Optional: Optional
This directive tells the MapInfo writer to create an optimal spatial index when writing. This will allow for faster spatial queries on the resulting file when using MapInfo Pro or other software that takes advantage of built in spatial indexing. The use of this directive will, however, slow down the writing of the file. The default value for the directive is no. The syntax of this directive is:
MAPINFO_BUILD_OPTIMAL_SPATIAL_INDEX <yes|no>
Workbench Parameter: Build Optimal Spatial Index
Note: This writer directive applies only to the MITAB writer.
USE_SOURCE_BOUNDING_BOX
The USE_SOURCE_BOUNDING_BOX directive tells the MapInfo writer to attempt to use any bounding box information that the Reader for the current FME session can provide it to set its bounds. This will only be used when no coordinate system is set for the MapInfo writer.
Currently, only the Shape reader in FME provides bounding box information, so setting this directive to YES will only have an effect if a Shape to MapInfo translation is being performed without any coordinate system being set.
Note: This is a writer directive and applies only to the MapInfo writer. Its use is discouraged.
FILENAME_PREFIX
Required/Optional: Optional
The value for this keyword 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:
MAPINFO_FILENAME_PREFIX temp
WRITE_REGION_CENTROIDS
Required/Optional: Optional
To direct the Writer to output calculate the region centroid and store the x and y values in the corresponding mapinfo_centroid_x and mapinfo_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 a default centroid value will still be calculated by underlying libraries. The syntax of this directive is:
WRITE_REGION_CENTROIDS yes
Workbench Parameter: Generate and Write Region Centroids
STROKE_ARCS
Required/Optional: Optional
Indicates whether the arcs will be vectorized before writing. If yes, all arcs will be converted to polylines. This option may be useful where sweep angles have precision finer than 0.1 degree.
STROKE_ARCS yes
Workbench Parameter: Stroke arcs into polyline
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)
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