Feature Representation

In addition to the generic FME feature attributes that FME Workbench adds to all features (see the chapter About Feature Attributes), this format adds the format-specific attributes described in this section.

All Generate features contain a numeric ID field. The numeric ID is stored in the arcgen_id attribute of an FME feature read from a Generate file or destined to be written to a Generate file.

Tip: Features being written to an ARCGEN file must have an arcgen_id attribute.

FME considers the basename of the Generate file to be the FME feature type of a Generate feature. The feature type of a Generate feature must match the basename of a Generate file defined by a Generate DEF line. Each feature read from a Generate file has an ARCGEN_GEOMETRY attribute added to it that indicates if the feature came from an arcgen_point, arcgen_line, or arcgen_text file. The writer can also handle homogeneous aggregate features of points, lines or text, which also have an ARCGEN_GEOMETRY attribute.

Points

Generate files containing only points consist of a series of lines that follow this syntax:

<idNumber>,<x>,<y>[,<z>]

Tip: By using the idNumber associated with each Generate feature as a key into a comma-separated value file, the @Relate command can be used to attach attributes to Generate features.

The <idNumber> is any numeric value, and need not be unique within a file. As well, the <z> value is optional and, if it is not specified, the point is considered to be two-dimensional. The file is terminated by a line containing only the word END.

A two-dimensional point Generate file example is shown below:

601,3,7
602,53,21
603,19,20
END

Lines

Generate files containing only linear features consist of a series of lines that follow this syntax:

<idNumber>
<x0>,<y0>[,<z0>]
<x1>,<y1>[,<z1>]
…
<xN>,<yN>[,<zN>]
END

Tip: Polygonal features may also be input and output using linear Generate files. In such cases, the first point and the last point of the line are identical.

As with point files, the <idNumber> is any numeric value, and need not be unique within a file. As well, the <z> value is optional and, if it is not specified, the linear feature is considered to be two-dimensional. The end of each linear feature is marked by a line containing only the word END. A linear Generate file is terminated with two consecutive lines containing only the word END. A three-dimensional linear Generate file example, containing two features, is shown below:

101
32,52,1
33,56,2
36,59,6
31,70,3
END
102
52,32,3
53,56,5
56,29,1
61,73,14
END
END

Text

Generate files containing only text (annotation) features, consist of a series of lines that follow this syntax:

<idNumber>,<x>,<y>,<angle>,<size>,<text>

As with point files, the <idNumber> is any numeric value and need not be unique within a file. A Text generate file is terminated with the word END. A text Generate file example, containing two features, is shown below:

101,32,52,0,20,Arnet Maves
102,52,32,90,30,Barnie Maves
END

The attributes used by the generate reader and writer are described in the following table.

Attribute Name

Value

arcgen_rotation

Specifies the rotation of the text in degrees measured counterclockwise from horizontal.

Range: -360.0 . . . 360.0

Reprojectable: Yes

arcgen_text_size

The size of the annotation in ground units.

Range: Float > 0

Reprojectable: Yes

arcgen_text_string

The text string to be placed at the annotation location.

Range: Any text string

The example below shows an FME mapping file used to translate some points and linear features from the Generate format into Shape files. The mapping file defines the dataset location and gives the Generate definitions for the two files to be read. At run time, the Generate reader goes out to the folder, reads the files, and produces an FME feature for each Generate feature it finds.