ASCII Ungenerate (ARCGEN) Profile

The ASCII Ungenerate profile is specified in the Geomatics Canada document titled “Conversion of NTDB Edition 3 Data into ASCII Ungenerate Format”. This profile has the following properties:

  • A separate output file is generated for each entity and geometric representation such as, point, line, area.
  • File names have a maximum of eight characters. The first seven are the seven-character identifier for the theme—for example, BATIMEN, BUILDIN, CHEMINE, CHIMNEY—followed by a single character for the entity type—P, L or A.
  • Point data is stored in a file with the extension .pts, lines in a file with the extension .lin, and areas in a pair of files—a .lin file for the boundary and a .pts file for the centroid.
  • The National Topographic System (NTS) mapsheet number; for example, 031h01 is used to name a folder that contains the subfolders points, lines, and areas.
  • Attributes are stored in a comma-separated value (CSV) file in the same folder as the corresponding geometry data.
  • Each attribute file contains a minimum set of attributes: identifier, entity_name, code_gener, code_expli, ATG, ATZ, ATE, accuracy (precision in French), and angle is used for point entities only.

Some of these conventions are difficult to follow with an automatically generated mapping file, especially considering the variety of output formats available. Even for ARCGEN output, however, FME cannot completely adhere to these rules without involving manual editing of the generated mapping file.

The FME’s approximation to the above conventions are as follows:

  • Target dataset is specified by the user at run-time to be the NTS map number. For many formats, this is a folder that contains a separate file for each feature type, or entity file name. Other formats are written to a single file, with different layers or levels, or whatever the target format’s terminology is, for the entity files.
  • Feature type names are the same eight-character name mentioned in the specification. The seven-digit entity name is determined by looking up the generic code in a predefined tables. Some formats tack on a suffix, such as _arc or _point to the entity name. The way mapping file generation works in FME, this is unavoidable however, it can be removed by hand once the mapping file has been generated.
  • No subfolders are created in the target folder for points, lines, and areas.
  • If the target format were ARCGEN, the file names will all have .gen extensions, instead of .pts and .lin, and no CSV files will be created.
  • When possible with the choice of output formats, the attributes are defined as described above. Additional attributes take either the English or French name of the corresponding CCOGIF attributes, depending on the setting of NTDB_Language.

To generate a mapping file for the ARCGEN profile, a source format specification of ntdbcg, which is an abbreviation of NTDB CCOGIF to Generate, is used. An example of how this is written is:

fme generate ntdbcg ...