Writer Directives

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

DATASET

Required/Optional: Required

The value for this keyword is the folder where the DTO files are to be written. A typical mapping file fragment specifying an output MCF folder looks like:

<WriterKeyword>_DATASET /usr/data/mexico/output

Workbench Parameter: Destination STAR-APIC Mercator MCF Folder

DEF

Required/Optional: Optional

The definition specifies only the base name of the file, the type of geometry it contains, and names and types of all attributes. The syntax of an MCF DEF line is:

<WriterKeyword>_DEF <baseName> 	\
mcf_type mcf_line| \
mcf_area| \ mcf_point| \ mcf_text| \ mcf_external| \ mcf_job
[<attrName> <attrType>]+

The attribute types created by the MCF format are listed below.

Field Type

Description

char(<width>)

Character fields store fixed-length strings. The width parameter controls the maximum characters that can be stored by the field. When a character field is written, it is right-padded with blanks, or truncated, to fit the width. When a character field is retrieved, any padding blank characters are stripped away.

decimal(<width>,
<decimals>)

Decimal 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.

HORIZ_SIZE

Required/Optional: Optional

The value for this keyword is the horizontal size of the dataset to be output into the job file. This value is in Mercator units. One Mercator unit is 1/256000 of an inch. If a feature of type mcf_job comes into the writer and this keyword is not set, then the job file will have the largest horizontal size from all of the job features. If this keyword is not specified and there are no input job features, the job file output will have the value shown below (A4 width in Mercator units). The syntax of an MCF HORIZ_SIZE line is:

<WriterKeyword>_HORIZ_SIZE 2956651

Workbench Parameter: Horizontal Size [optional]

VERT_SIZE

Required/Optional: Optional

The value for this keyword is the vertical size of the dataset to be output into the job file. This value is in Mercator units. One Mercator unit is 1/256000 of an inch. If a feature of type mcf_job comes into the writer and this keyword is not set, then the job file will have the largest vertical size from all of the job features. If this keyword is not specified and there are no input job features, the job file output will have the value shown below (A4 width in Mercator units). The syntax of an MCF VERT_SIZE line is:

<WriterKeyword>_VERT_SIZE 2118144

Workbench Parameter: Vertical Size [optional]

OFFSET_X

Required/Optional: Optional

The value for this keyword is the value by which all x-coordinates will be offset. This is a floating point value. For MCF-to-MCF translations, this value is set to 0. If this value is not set, then the writer will calculate its own offset to bring the coordinates to the origin of (0,0). The syntax of an MCF OFFSET_X line is:

<WriterKeyword>_OFFSET_X 0

All MCF data is two-dimensional.

Workbench Parameter: Offset(X)

OFFSET_Y

Required/Optional: Optional

The value for this keyword is the value by which all y-coordinates will be offset. This is a floating point value. For MCF-to-MCF translations, this value is set to 0. If this value is not set, then the writer will calculate its own offset to bring the coordinates to the origin of (0,0). The syntax of an MCF OFFSET_Y line is:

<WriterKeyword>_OFFSET_Y 0

Workbench Parameter: Offset(Y)

SCALE_X

Required/Optional: Optional

The value for this keyword is the value by which all x-coordinates will be scaled. This is a floating point value. A value of 1 will leave the x-coordinates of the incoming features as is. For MCF-to-MCF translations this value defaults to 1 but can be changed in the mapping file. If this value is not specified, then the writer calculates its own scale factor that is as large as possible to minimize the loss of precision when decimal coordinates are stored as integers in MCF when writing Version 6.4. The syntax of an MCF SCALE_X line is:

<WriterKeyword>_SCALE_X 1

Workbench Parameter: Scale(X)

SCALE_Y

Required/Optional: Optional

The value for this keyword is the value by which all y-coordinates will be scaled. This is a floating point value. For MCF to MCF translations this is default to 1 but can be changed in the mapping file. The writer flips the y-coordinates over the x-axis because of MCF’s origin. If this value is not specified, then the writer calculates its own scale factor that is as large as possible to minimize the loss of precision when decimal coordinates are stored as integers in MCF when writing version 6.4. The syntax of an MCF SCALE_Y line is:

<WriterKeyword>_SCALE_Y 1

Workbench Parameter: Scale(Y)

VERSION

 

Required/Optional: Optional

The value for this keyword determines the version of Mercator MCF that is to be output. Version 7.0 allows decimal values, unlike Version 6.4 which allows only integer values. When 7.0 is specified, the default values for SCALE_X, SCALE_Y, OFFSET_X, OFFSET_Y are 1, 1, 0, 0 respectively.

Note: It is possible that the version number may be called something other than 7.0.

The syntax of a version line is:

<WriterKeyword>_VERSION

Workbench Parameter: MCF Version Out