Text Feature Store (TFS) Variable Schema Reader/Writer

This chapter describes how FME reads and writes Text Feature Store (TFS) Variable Schema files.

Overview

TFS Variable Schema is a model format that is distributed as part of FME’s Plug-in SDK to demonstrate how to create reader/writer plug-ins in various programming languages. There are two flavors available in FME – C++ TFS Variable Schema, which is implemented in C++, and Java TFS Variable Schema, which is implemented in Java.

TFS Variable Schema is a text-based format, which can be read and edited with the use of a text editor. Being able to edit datasets with a text editor allows for simple creation of features with a limitless possibility in terms of their geometries.

TFS Variable Schema files store both geometry and attributes for features. A logical TFS Variable Schema dataset consists of one or more files in the same folder with the extension .tfs. This extension is added to the base name of the TFS Variable Schema files. The files within the folder are divided by the feature types of a dataset. Meaning each file contains one or more features of the same feature type.

In addition to sharing the same feature type, the features within a TFS Variable Schema file also share the same list of user-defined attributes. In other words, all features belonging to the same TFS Variable Schema file have the same value for the feature type and the same list of user-defined attributes. The values of the user-defined attributes can vary from feature to feature within the same TFS Variable Schema file. The feature type and the names of the user-defined attributes for an individual TFS Variable Schema file are specified in the DEF line for that TFS Variable Schema file.

Schema information for a dataset is explicitly stored in the header of TFS Variable Schema files. The syntax of the schema information is:

FEATURE_SCHEMA_INFORMATION
FEATURE_TYPE: <FeatureTypeName>
[<attrName> <attrType>]+
END

A feature within a TFS Variable Schema file is represented using the following syntax:

FEATURE_TYPE: <FeatureTypeName>
{
[<attrName> <attrValue>]+
}
GEOMETRY: <geometryDefinition>

TFS Variable Schema files contain a coordinate system definition that applies to all the features it contains, if any. The coordinate system definition is stored in the header of the TFS Variable Schema files following the schema information. In the case where a dataset does not contain a coordinate system, the coordinate system definition’s value is not specified.

The geometries on the features of a TFS Variable Schema file may be both two- and three-dimensional. Furthermore, the dimensionality of geometries on a feature is independent of geometries on other features within the same file (of the same feature type).