Theme Definition

Geometric entity records are grouped into themes, where all entities within a given theme have the same geometric type – point, line, or area – and the same set of attributes. Each theme written to a CCOGIF file is defined by a CCOGIF DEF line. The DEF line specifies the name of the group to which the theme belongs, and allows specification of the relative ordering of the themes within the groups. The header records for data groups (DGHR) are written to the output file for each group mentioned on a DEF line.

The group name and theme ordering index may be specified explicitly on the DEF line with the CCOGIF_GROUP_NAME and CCOGIF_THEME_ORDERING keywords, or they may be implied by the theme identifier. If the DEF line does not have a CCOGIF_GROUP_NAME, the theme identifier, or FME feature type, becomes the implied group name. In this case, the DEF line actually defines attributes for the group itself and not a particular theme, and therefore must not include any theme ordering or entity type information. The reasons and implications of assigning attributes to a group instead of a theme within the group are discussed below.

If the DEF line contains neither an explicit group name or an explicit theme ordering, and the theme identifier is of the form <groupName>_<number>, where <number> is any integer, then the group name and theme ordering are implied as <groupName> and <number> respectively.

The geometric entity type for each theme must be provided on the theme’s DEF line by using the CCOGIF_THEME_ENTITY_TYPE keyword. However, it is not necessary for every DEF line to have an entity type provided. If neither entity type nor theme ordering information is specified, then the DEF line is considered to define a set of attributes for a data group rather than for a data theme.

Strictly speaking, it makes no sense to talk of attributes being assigned to a CCOGIF data group as attributes are assigned to themes within the CCOGIF file. This mechanism, however, provides the ability to essentially define a point, line, and area theme within a single group, with identical sets of attributes. Any features with the specified feature type are written to the appropriate theme—point, line, or area—depending on the geometry type of the feature. Features with aggregate geometry or no geometry at all will not be written.

The themes implied with this mechanism, called generic themes from this point on, may coexist with other themes in a group, making it possible to define a number of themes for a data group as well as to define generic themes for “the other stuff that we want to write but that doesn’t fit into our predefined themes”. If the generic theme mechanism is used, its DEF line must appear in the mapping file before the DEF lines for any non-generic themes within that group.