Feature Representation (VPF Reader)
In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Type Attributes), this format also adds format-specific attributes (Format Attributes).
The VPF reader produces FME features for VPF feature class features as well as VPF metadata table entries when a reader is invoked in database mode (VPF_DB).
There are many types of FME features produced for metadata at every level of a VPF database.
At the root level of the database, FME features are produced for:
- Database Header Table (DHT)
- Library Attribute Table (LAT)
- Data Quality Table (DQT) (if it exists)
At the library level of the database, FME features are produced for:
- Coverage Attribute Table (CAT)
- Library Header Table (LHT)
- Geographic Reference Table (GRT)
- Data Quality(DQT) and Lineage Document (LINEAGE.DOC) Tables (if they exist)
At the coverage level of the database, FME features are produced for:
- Character and Integer Value Description Tables (CHAR.VDT, INT.VDT)
- Symbol and Notes Related Attribute Tables (SYMBOL.RAT, NOTES.RAT)
- Feature Class Attribute and Schema Tables (FCA) and (FCS)
- Data Quality Table (DQT)
- coverage document table (<coverage name>.DOC)
- feature class document tables (<feature class name>.DOC)
With the exception of the feature class schema table (FCS), all coverage metadata tables are optional and FME features are only produced for metatables that exist.
An FME feature is produced for each row in each metadata table that is processed. For each column in a metadata table, there is one attribute in an FME feature with the same name and type as the column. The value of each attribute will be the same as the row from which the feature was produced. No geometric information is attached to features that are produced from metadata tables.
The other type of FME features that this reader produces result from VPF feature class features. This type of feature can have zero or more geometries attached to it. For this reason, all of the FME features produced for these VPF features contain an aggregate of geometries. For most feature class geometry types, all geometries in the resulting features are the same type—the type of the table. For complex feature classes, a single feature can contain any mixture of text, point, line, and area features.
The attributes for each geometry are given by the attribute component{<n>}.<attrName>, where n is the position of the geometry in question with the first one being at position 0, and <attrName> is the geometry-specific attribute in question.
The attributes defined for each geometry are totaled in the following table.
Name |
Description |
Defined On |
vpf_type |
The type of this specific geometry. This has one of the following values: vpf_area vpf_line vpf_point vpf_text |
All geometries |
vpf_database_name |
The name of the database to which the feature belongs. |
|
vpf_library_name |
The name of the library to which the feature belongs. |
|
vpf_coverage_name |
The name of the coverage to which the feature belongs. |
|
vpf_feature_class |
The name of the feature class to which the feature belongs. |
|
vpf_tile_name |
The name of the tile in which the feature lies. The tile_name also depicts relative tile path. |
|
vpf_containing_face |
This attribute is present for entity nodes for level 3 topology. It contains the face_id of the area containing the node. |
|
vpf_first_edge |
This attribute contains the edge_id of the first_edge of a connected node. This attribute will be present for level 1 and higher topology. |
|
component{#}.attributeName
e.g., component{#}.vpf_type |
List attributes of the parts of the geometry and defines the geometry-specific attributes on the feature. For example, component{0}.vpf_typemeans the vpf_type of the first component of the feature. |
|
vpf_text_string |
The string to be displayed for a vpf_text geometry. |
vpf_text |
vpf_text_height |
The height of a vpf_text geometry. This is automatically extracted from the SYMBOL_RAT{0}.SIZE attribute. Although the VPF standard does nto explicitly specify this attribute it is used to preserve the point size of the text feature when specified. It s used in combination with vpf_text_scale to calculate the text height in ground units stored in fme_text_size attribute will be automatically deleted in case the fme_text_sizeis modified. (See the information under the heading Special Attribute Handling.) |
vpf_text |
vpf_text_font |
The font used to display vpf_text geometry. This is automatically extracted from the SYMBOL_RAT{0}.FONT or SYMBOL_RAT{0}.FON attribute. |
vpf_text |
vpf_text_color |
The color used to display vpf_text geometry. This is automatically extracted from the SYMBOL_RAT{0}.COLOR or SYMBOL_RAT{0}.COL attribute. |
vpf_text |
vpf_text_style |
The style used to display vpf_text geometry. This is automatically extracted from the SYMBOL_RAT{0}.STYLE or SYMBOL_RAT{0}.STY attribute. |
vpf_text |
vpf_rotation |
The rotation at which the text is to be displayed. This is calculated from the lower left and lower right coordinates of the text line, and is expressed in degrees counterclockwise from due east. It defaults to 0.0 if the text geometry has only one coordinate in the VPF data. |
vpf_text |
vpf_text_scale |
The scale read from the Library Header Table (LHT) in the library containing the feature. A default scale of 0, 1000000 will be used if no scale is specified. Scale is used in combination with vpf_text_height to calculate the fme_text_size. |
vpf_text |
vpf_original_geometry Optional |
The original geometry as read by the VPF Reader in the Well Known Text (WKT) format for when text geometries are not a simple single point. Used to preserve the original text geometry. This attribute will be deleted if fme_rotation is modified. This attribute is only present if the shape line contains more than one coordinate pair. The order of coordinate pairs follows the specs found in VPF: the first coordinate pair represents the lower left coordinate, and the second coordinate pair defines the lower right of the string. Third and subsequent coordinate pairs define control points in a shape line, i.e the points in between the first and second pairs. |
vpf_text |
vpf_sequenced_geometry Optional |
It is similar to This attribute is only present if the shape line contains more than one coordinate pair. |
vpf_text |
VPF represents text primitive geometries as lines (one or more points, first being lower left corner and last being lower right corner) and an optional text size (height in typographical point size, as defined in the SYMBOL.RAT table).
The FME point geometry is simply extracted from the first point of the VPF line geometry, both of them being located at the lower left bound of the string.
The FME rotation, in degrees, is calculated from the first and the last coordinate of the VPF line geometry. If only one point is present, it defaults to zero.
The FME text size, in ground units, is calculated from the VPF text size, in typographical point size. In the special case of a VPF text primitive with only one point and no VPF text size, the conversion will be done using a default VPF text size of 2. Otherwise, in case the VPF text size is not present, the FME text size is approximated by using the width of the string in ground units and the approximation that the height of a character in ground units is half its size.
To avoid inconsistencies between VPF specific attributes and FME generic ones, the FME text size is entangled with the VPF text height and the FME rotation is entangled with the VPF original geometry. Attempts to modify the FME generic attribute will delete the VPF specific attribute. However, modification of the VPF specific attributes will not delete the FME generic attribute in order to maintain a valid FME feature while allowing the possibility to force the reader to use certain VPF specific attribute values.
When a reader is invoked in database mode (VPF_DB), all FME feature types are scoped to reflect their level in the database hierarchy. As an example, an FME feature produced from a row in a Library Header Table (LHT) will have a feature type that contains both the local name LHT and the library name where the table is found. FME features produced from a LHT metadata file in the NOAMER library will have a feature type of NOAMER\LHT.
The structuring of VPF data allows for a very expressive schema definition, which is somewhat difficult to capture using traditional typing information. The following variations, from a flat table structure, are of particular interest.
- VPF may contain attributes that are arrays of two-dimensional (2D) and three-dimensional (3D) coordinates.
- Any integer or text attribute in a VPF table may be associated with a value descriptor table, giving a more verbose textual description of the attribute.
- Feature classes in VPF are defined by joining various tables together, leading to a hierarchy of attribute values.
- Text primitives do not themselves contain any color, style, size, or font information, but the features often define these attributes by relating in a symbology table, such as SYMBOL.RAT.
VPF coverages typically contain two value descriptor tables, INT.VDT and CHAR.VDT. It is possible for any number of *.VDT tables, with any names, but these are typical. The purpose of the Value Descriptor Table (VDT) is to define, for each feature class-attribute name pair using the VDT, a mapping of an integer or short text string with limited number of values, and a longer text description of the attribute value.
For example, VDTs are used to assign an English description to a feature code. An airport might have a feature code attribute of AF001 meaning an International Air Field. The feature table for the feature would contain a code of AF001 and a reference to the value descriptor table. The value descriptor table then provides the mapping from AF001 to International Air Field.
The lookups into value descriptor tables are handled automatically by the VPF reader. An attribute named <attrName> corresponding to an entry in a VDT results in two attributes being defined on the FME feature: <attrName> and <attrName>desc.
In the above example, the feature code would be defined in an attribute such as FCOD in the feature table. The resulting FME feature would contain two attributes for this:
FCOD “AF001” FCODdesc “International Air Field”