OGC CityGML 3 Reader/Writer

FME can read and write files in the OpenGIS® City Geography Markup Language (CityGML) v2 and v3 format.

The CityGML v3 Writer is currently available as a technology preview. As such, certain features are not yet fully supported. Most notably, appearances and textures from FME features are not yet processed into X3DMaterial and ParameterizedTexture elements within the output.

CityGML is an XML-based format for the storage and exchange of 3D urban models. It extends Geography Markup Language 3 (GML3) through an application schema.

CityGML 3 defines a standardized conceptual model that can be implemented in a variety of technologies. This module supports the CityGML 3.0 Part 2: GML Encoding Standard, as well as the older CityGML 2.0 standard.

Note  This documentation assumes familiarity with GML and the CityGML format.

Product and System Requirements

Format

FME Platform

Operating System

Reader/Writer

FME Form

FME Flow

FME Flow Hosted

Windows 64-bit

Linux

Mac

Reader

Yes

Yes

Yes

Yes

Yes

Yes

Writer

Yes

Yes

Yes

Yes

Yes

Yes

Reader Overview

This reader supports CityGML datasets conforming to the CityGML 3.0 and 2.0 application schemas.

For more details, see the OGC CityGML 3 Reader Parameters.

Writer Overview (Technology Preview)

This writer supports output in the CityGML 3.0 format only and is currently provided as a technology preview. It does not yet support all features of the standard.

Appearance Feature Handling

The CityGML 3 writer automatically extracts appearance data (textures and materials) from FME geometry appearance references and texture coordinates on incoming features. It produces the corresponding CityGML Appearance, X3DMaterial, and ParameterizedTexture elements in the output, deduplicating materials with identical properties and grouping texture coordinates under shared texture references.

X3DMaterial, ParameterizedTexture, and GeoreferencedTexture features can also be sent directly to the writer. These are written to the output as provided, without deduplication or merging with automatically extracted appearances. This is intended for advanced workflows such as combining appearance data from multiple sources or preserving appearance structures that cannot be represented through FME geometry appearances alone (for example, multiple themes, GeoreferencedTexture). Users are responsible for ensuring that target references (#surface_id) match the gml:id values of geometry elements in the output.

Since automatic extraction cannot be disabled, sending appearance features that target the same surfaces within the same theme as geometry-based appearances will produce duplicate elements. To avoid this, remove appearance references from the geometry before writing, or do not send separate appearance features for surfaces already covered by geometry appearances. Sending appearance features for a different theme (for example, adding an infrared texture theme alongside an RGB theme extracted from geometry) is supported and will not result in duplicates.

For more details, see the OGC CityGML 3 Writer Parameters.