Reader Directives

The suffixes listed are prefixed by the current <ReaderKeyword> in a mapping file. By default, the <ReaderKeyword> for the CityGML reader is CITYGML.

DATASET

This directive specifies the location for the input CityGML instance document.

Required/Optional

Required

Mapping File Example

CITYGML_DATASET C:\CityGML_Data\GenericObjects.xml

Workbench Parameter

Source CityGML File(s)

USE_CITYGML_SCHEMA_FILES

If this directive is set to Yes, it reads the core CityGML schema files as well as the schema files specified in either the xsi:schemaLocation attribute in the XML document or the ADE_XSD_DOC directive to determine the feature types and feature attributes of the dataset.

It is recommended that you set this directive to Yes for new workspaces and mapping files in order to read CityGML 1.0, 2.0, and various ADE datasets.

Note: This directive is new for FME 2012. To duplicate the reader's behavior in FME releases prior to 2012, set this directive to No. Setting this directive to Yes is not backward-compatible if the dataset contains NoiseADE data.

The advantages of using the CityGML schema files include:

  • Support of complete feature types and attributes
  • Reading of any ADE feature types (Require that all the schema files are specified either in xsi:schemaLocation or ADE_XSD_DOC)

Required/Optional

Optional

Values

No (default) | Yes

Mapping File Syntax

CITYGML_USE_CITYGML_SCHEMA_FILES Yes

Workbench Parameter

Reader Driven by CityGML Schema

ADE_XSD_DOC

Note: This directive is new for FME 2012 and works in conjunction with USE_CITYGML_SCHEMA_FILES.

This directive can be used only if the USE_CITYGML_SCHEMA_FILES directive is set to Yes. The schema files specified in this directive will override those specified in the xsi:schemaLocation attribute in the XML document.

Required/Optional

Optional

Values

Space-separated file paths

Mapping File Syntax

CITYGML_ADE_XSD_DOC ““c:\some path\schema1.xsd” “c:\some path\schema2.xsd””

Workbench Parameter

Additional ADE Schema File(s)

GENERIC_ATTRS_AS_FEATURES

This directive controls whether, if it exists in the dataset, a generic attribute (_genericAttribute substitution group) such as stringAttribute, intAttribute etc., in CityGML should be output as a separate Feature Type GenericAttribute.

Regardless of the value of this option, the generic attribute will always be included as feature attributes for data features in which they are contained.

For example, if a Building element contains an intAttribute named highway speed limit and its value is 100, then the Building feature will have a highway speed limit attribute with its value set to 100, regardless of the value of this directive.

If this directive is set to Yes and the dataset contains Generic Attribute, then there is a GenericAttribute Feature Type with the following schema attributes: gml_parent_id, name, value and type. These schema attributes are the gml ID of the parent element, the name of the generic attribute (highway speed limit in the example), the value of the generic attribute (100 in the example), and the type of generic attribute element (‘intAttribute’ in the example).

Required/Optional

Optional

Values

YES | NO (default)

Mapping File Syntax

CITYGML_GENERIC_ATTRS_AS_FEATURES YES

Workbench Parameter

Include Generic Attributes as Feature Types

GENERIC_ATTRS_AS_SCHEMA_ATTRS

This directive controls whether generic attribute (_genericAttribute substitution group) such as stringAttribute, intAttribute etc. in CityGML should be included in the schema of Feature Types containing them.

Regardless of the value of this option, the generic attribute will always be included as feature attributes for data features in which they are contained. The only difference is the visibility of these attributes in the schema.

For example, if a Building element contains an intAttribute named highway speed limit and its value is 100, then the Building feature will have a highway speed limit attribute with its value set to 100 regardless of the value of this directive. However, the Building feature type will have a highway speed limit schema attribute if, and only if, this directive is set to YES.

Required/Optional

Optional

Values

YES | NO (default)

Mapping File Syntax

CITYGML_GENERIC_ATTRS_AS_SCHEMA_ATTRS YES

Workbench Parameter

Include Generic Attributes in FME Schema

ONLY_FEATURE_TYPES_IN_DATASET

If this directive is set to YES, then only feature types found in the dataset will be created. Otherwise, all feature types found in the CityGML core and additional schema files (as specified in ADE_XSD_DOC and xsi:schemaLocation in dataset) will be created.

If the USE_CITYGML_SCHEMA_FILES directive is set to NO, then the value of this directive is overridden and set to YES.

Required/Optional

Optional

Values

YES (default) | NO

Mapping File Syntax

CITYGML_ONLY_FEATURE_TYPES_IN_DATASET YES

Workbench Parameter

Include Only Feature Types in Dataset

SKIP_SCHEMA_LOCATION_IN_DATASET

If this directive is set to YES, then the reader will ignore the schema files specified in the xsi:schemaLocation attribute of the root element in the dataset. This is particularly useful if the file locations specified in xsi:schemaLocation are not valid file paths.

Required/Optional

Optional

Values

YES | NO (default)

Mapping File Syntax

CITYGML_IGNORE_SCHEMA_LOCATION_IN_DATASET NO

Workbench Parameter

Ignore xsi:schemaLocation in Dataset

TEXTURE_COORDINATES_ORDER_FIX

This directive is introduced in FME 2012.

This directive should only be set to YES if the source datasets have texture coordinates and were created by the CityGML writer in FME versions prior to FME 2012. Otherwise, it should be set to NO.

Required/Optional

Optional

Values

YES | NO (default)

Mapping File Syntax

CITYGML_TEXTURE_COORDINATES_ORDER_FIX NO

Workbench Parameter

Texture Coordinate Order to follow SRS Axis Order

VERSION

Required/Optional

Optional

Values

1.0 | 2.0 | NoiseADE_1 | NoiseADE_2

Mapping File Syntax

CITYGML_VERSION 2.0

Workbench Parameter

CityGML Version - For Importing Feature Types Without Dataset

APPEARANCES

This directive determines whether appearance information specified in the CityGML instance document (including texture files) should be read into the FME Appearances library.

If this directive is set to NO, then no textures or appearances will be applied to the geometries in the dataset.

Required/Optional

Optional

Values

No | Yes

Mapping File Syntax

CITYGML_APPEARANCES Yes

Workbench Parameter

Not applicable

MATERIAL_FEATURES

Required/Optional: Optional

This directive specifies whether features types for X3DMaterial, GeoreferencedTexture, and ParameterizedTexture elements should be created. Valid values are No and Yes.

In general, this keyword should be left with the value of “No” as the CityGML X3DMaterial and ParameterizedTexture are automatically incorporated into the FME geometry’s appearances.

Example:

CITYGML_MATERIAL_FEATURES No     

Workbench Parameter: Include X3DMaterial, ParameterizedTexture, and GeoreferencedTexture as Feature types

SRS_AXIS_ORDER

This directive overrides the axis order when reading coordinate tuples in a CityGML <pos> or <posList> element.

Required/Optional

Optional

Values

1,2,3 | 2,1,3 | 1,2 | 2,1

Mapping File Syntax

CITYGML_SRS_AXIS_ORDER 2,1,3

Workbench Parameter

GML SRS Axis Order

SEARCH_ENVELOPE

Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that interact with the bounding box are returned.

If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY>

Note: If all four coordinates of the search envelope are specified as zero, the search envelope will be disabled.

Required/Optional

Optional

Workbench Parameter

Minimum X, Minimum Y, Maximum X, Maximum Y

SEARCH_ENVELOPE_COORDINATE_SYSTEM

This directive specifies the coordinate system of the search envelope if it is different than the coordinate system of the data.

The COORDINATE_SYSTEM directive, which specifies the coordinate system associated with the data to be read, must always be set if the SEARCH_ENVELOPE_COORDINATE_SYSTEM directive is set.

If this directive is set, the minimum and maximum points of the search envelope are reprojected from the SEARCH_ENVELOPE_COORDINATE_SYSTEM to the reader COORDINATE_SYSTEM prior to applying the envelope.

Required/Optional

Optional

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE_COORDINATE_SYSTEM <coordinate system>

Workbench Parameter

Search Envelope Coordinate System

CLIP_TO_ENVELOPE

This directive specifies whether or not FME should clip features to the envelope specified in the SEARCH_ENVELOPE directive.

Values

YES | NO (default)

Mapping File Syntax

<ReaderKeyword>_CLIP_TO_ENVELOPE [yes | no]

Workbench Parameter

Clip To Envelope

EXPOSED_ATTRS

This directive allows the selection of format attributes to be explicitly added to the reader feature type.

This is similar to exposing format attributes on a reader feature type once it has been generated; however, it is even more powerful because it enables schema-driven applications other than Workbench to access and leverage these attributes as if they were explicitly on the schema as user attributes.

The result of picking a list of attributes is a comma-separated list of attribute names and types that will be added to the schema features. Currently all reader feature types will receive the same set of additional schema attributes for a given instance of the reader.

Required/Optional

Optional

Mapping File Syntax

Not applicable.

While it is possible for FME Objects applications to invoke this directive, the required format is not documented.

This directive is intended for use in our GUI applications (for example, Workbench) only.

Workbench Parameter

Additional Attributes to Expose