Controlling E00 Output

The E00 writer allows easy generation of E00 files, but also provides a high level of customization to the format and content of the resulting E00 files. In its simplest form, the E00 writer takes FME features defining line, point, text, and polygon features, and writes them to the appropriate subfiles of the E00 file.

This mode of operation makes it very easy to create a workspace or mapping file that creates E00 files:

  • Decide on the names of the E00 files.
  • For each file, decide on the type of geometry to go into the file, and the names and types of the attributes.
  • Create a DEF line to define the attributes.
  • Create the correlation line to direct the features at the appropriate files. Features going to an E00 file must contain an attribute named e00_type, with one of the values e00_point, e00_arc, e00_text, or e00_poly. The writer uses this attribute to determine how the features’ geometry is written out. Some geometry might require additional attributes to be defined on the features being written – see Geometry Composition for more information.

This will generate all of the ARC, LAB, CNT, PAL, TX6 or TX7, *.BND, *.TIC, *.AAT, *.PAT, and *.TAT+ records needed to describe the features passed-in. This is normally all one will need to create E00 files. However, the E00 writer also contains mechanisms to allow the advanced user to:

  • Define specific label locations for polygons.
  • Explicitly direct a particular feature to a particular subfile.
  • Create multiple info files within a single E00 file, each with its own set of attributes.

These mechanisms are described below.

Specific Label Positions

When the E00 writer generates a PAL record to define a polygon, it also generates a centroid (CNT) record and a label (LAB) record. The position of the centroid and the label are normally computed to be some point within the polygon. (The computed location will always be inside the polygon, but not inside any hole of the polygon.) A specific location will be used for the location of the CNT and LAB records, instead of the computed location, if the E00 writer is given a feature with a point-in-polygon (PIP) geometry instead of a polygon or donut geometry. In this case, the point contained in the PIP will define the location of both the label and the centroid.

Explicit Subfile Selection

The E00 writer normally looks for the e00_type attribute to decide how to write out the features. If this attribute is not present, or has the value of e00_no_geom, the writer will look for an attribute named E00_SUBFILE on the input feature. This tells the writer the subfile in which to write the record. This can be one of the standard subfiles (ARC, LAB, TOL, etc.) or any one of the info files.

This provides a powerful tool to the mapping file author. By changing a few attributes on an FME feature, that feature can be directed to almost any part of the E00 file.

There are two warnings associated with explicit subfile selection:

  • The first is that the author of the mapping file must ensure that all of the attributes necessary to write the feature are present on the FME feature when it is given to the E00 writer. This is generally true in FME mapping files, but is of particular importance to this option. For the standard files, the attributes defined in the table shown in Feature Types must be present on the features. Features destined for info files must provide values to all attributes defined on the info file. Info File Creation explains how info file attribution works.
  • The second is that the mapping file must not write features directly to a standard subfile or info file that is also being written to with the normal geometry writing. The writer contains an internal state to keep track of which geometries have been written to each subfile, and can become easily confused if other features are manually inserted into the same subfiles.

Info File Creation

The E00 normally assigns all attributes specified on the feature type to all info files. This is usually not a problem, since an E00 file will typically just define some geometry of a single type, and associate attributes with each piece of geometry.

However, there are instances where the workspace author will want more control over the format of the info file. For example, an input file of tabular data can be placed into a specific info file using the explicit subfile selection described in Explicit Subfile Selection above. The usual means of specifying info file attributes on the feature type will place the same attributes on every info file in the E00 file. If there is other information to be placed into the same E00 file, such as annotation (text features) and linear geometry (arc features). The other info files have to carry attributes from the tabular data’s info file and vice-versa.

To overcome this, the feature type can contain attribute definitions specific to each info file.

The E00 writer uses the following heuristic to decide which attributes are defined on a given info file:

  1. The .BND and .TIC info files each have a predefined set of attributes and corresponding types which are always used, and never supplemented.
  2. If the info file is one of the geometry-related info files – .AAT, .PAT, or .TAT+ – have a predefined set of attributes which are always present, but are supplemented by any attributes from 3 or 4 below.
  3. If there are any attributes that were specified using the <infoFile>:<attrName> syntax, for this particular info file, they are appended to the info file definition.
  4. If there were no info file-specific attributes in 3, then any attributes which were specified with the normal <attrName> syntax will be appended to the info file definition.