Facet XDR Reader/Writer

The Facet XDR Reader/Writer allows FME to read and write Facet XDR files. The Facet XDR Format (Facet) is a binary format used by tools produced by Facet Decision Systems, Inc.

Facet datasets may be in either ASCII or binary (XDR) format. Currently, FME supports only the binary version.

Overview

Facet datasets store objects that are very flexible in nature. Facet XDR files are self-describing and contain two parts:

  • a signature defining the interpretation of the file’s structure and
  • a second part containing either coordinates, attribute data, or methods depending on the signature.

Facet structures can mix simple data, other structures, and methods nested to any depth. Therefore, Facet may hold either two-dimensional (2D) or three-dimensional (3D) geometric data.

Facet files store both feature geometry and attributions. A logical Facet file consists of one physical file, with the .xdr file name extension.

The extension .xdr is added to the basename of the Facet file when written.

Reader Overview

The Facet reader opens the input file and immediately starts reading features, returning them to the rest of FME for processing. The reader doesn't have any requirement for explicit instruction on how to decode Facet files, as it automatically identifies the type of file from the signature it contains.

The feature returned by the Facet reader has its feature type set to its file basename.

FME automatically recognizes nine different Facet file structures and imports the coordinates and attributes in a special way. If the Facet file does not conform to any of the following nine known formats, FME will interpret the file as a “database” type, which retains all information it contains but does not perform any special conversion on any fields. The table below lists the nine special Facet file formats.

File Format

Contents and Interpretation

text

Contains text features without attributes.

text and attributes

Contains text features with custom attributes.

geometry

Contains single precision geometric information; for example, line, multipoint, polygon.

double geometry

Contains double precision geometric information; for example, line, multipoint, polygon.

geometry and 
attributes

Contains single precision geometric information; for example, line, multipoint, polygon, followed by custom attributes for each feature.

double geometry and attributes

Contains double precision geometric information; for example, line, multipoint, polygon, followed by custom attributes for each feature.

interleaved geometry and attributes

Contains single precision geometric information; for example, line, multipoint, polygon, interleaved with custom attributes for each feature.

interleaved double geometry and 
attributes

Contains double precision geometric information; for example, line, multipoint, polygon interleaved with custom attributes for each feature.

database

Contains attribute information only with no coordinates.

Writer Overview

The Facet writer creates and writes feature data to a folder specified by the Dataset parameter. Unlike the reader, this parameter refers to a folder, not a file name. This folder will be created if it does not exist before the translation occurs. Many Facet files may be written in a single FME session (one translation).

The feature type on each Facet DEF line specifies the basename of the output Facet XDR file.

Each Facet feature type specifies a single Facet output file. The feature type attributes appear within the output Facet file. The special Geometry Feature Type Property assists FME in determining the format of the output Facet file.

The table below outlines how FME decides what special format the output Facet file will take.

Output File Format

Conditions

text

In the Feature Type dialog, the Geometry parameter is assigned the value facet_text.

Number of attributes: 0

text and attributes

In the Feature Type dialog, the Geometry parameter is assigned the value facet_text.

Number of attributes: at least 1

geometry

The COORD_PRECISION keyword is set to Single.

The FACET_GEOMETRY on the DEF line is assigned the value facet_line, facet_polygon, or facet_multipoint.

The DEF line specifies no attributes.

double geometry

The COORD_PRECISION keyword is set to Double.

The FACET_GEOMETRY on the DEF line is assigned the value facet_line, facet_polygon, or facet_multipoint.

The DEF line specifies no attributes.

interleaved geometry and
attributes

The COORD_PRECISION keyword is set to Single.

The FACET_GEOMETRY on the DEF line is assigned the value facet_line, facet_polygon, or facet_multipoint.

The DEF line specifies at least one attribute.

interleaved double geometry and attributes

The COORD_PRECISION keyword is set to Double.

The FACET_GEOMETRY on the DEF line is assigned the value facet_line, facet_polygon, or facet_multipoint.

The DEF line specifies at least one attribute.

database

The FACET_GEOMETRY on the DEF line is not assigned any value, or is assigned a value other than facet_text, facet_line, facet_polygon, or facet_multipoint.

The DEF line specifies at least one attribute.