Writer Directives

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

DATASET

This directive specifies the location for the output CityGML instance document. By default, the <WriterKeyword> for the CityGML writer is CITYGML.

Required/Optional

Required

Mapping File Syntax

CITYGML_DATASET C:\CityGML_Data\GenericObjects.gml

Workbench Parameter

Destination CityGML Document

DOCUMENT_ENCODING

By default, the CityGML writer produces UTF-8 encoded documents. If this parameter is set to another encoding, the writer will transcode the data to the specified encoding.

Required/Optional

Optional

Values

No | Yes

Mapping File Syntax

CITYGML_DOCUMENT_ENCODING UTF-16BE

Workbench Parameter

CityGML Document Encoding

SRS_NAME

The CityGML writer will attempt to write srsName attributes on the geometry based on EPSG numbers that match the coordinate system of the features that it is writing.

In some cases, there are no existing well-known names. If this is the case, FME will not write an srsName. However, if you want to provide an srsName attribute, you can set the directive SRS_NAME and its value will be inserted into the srsName attribute of the geometry written.

Note: This is not the same as setting the coordinate system keyword/parameter for the writer. No reprojection will be done on the basis of the SRS_NAME directive. This directive is strictly for those cases where the user can provide a name (and possibly an axis order) for an srsName that FME is not aware of.

Required/Optional

Optional

Mapping File Syntax

SRS_NAME EPSG:4326

Workbench Parameter

GML srsName

SRS_AXIS_ORDER

This parameter is used only when the user is providing an srsName via the SRS_NAME parameter.

It determines the coordinate order when writing geometries.

Required/Optional

Optional

Values

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

Mapping File Syntax

SRS_AXIS_ORDER 2,1,3

Workbench Parameter

GML srs Axis Order

PRETTY_PRINT

Required/Optional: Optional

This directive specifies whether the output XML document should be pretty-printed with indentation. The valid values for this directive are YES and NO. The default value is NO.

GML_PRETTY_PRINT YES

Workbench Parameter: Pretty Print

INDENT_SIZE

Required/Optional: Optional

This directive takes effect when PRETTY_PRINT is set to YES. It specifies the indentation size. The valid values for this directive are the numbers 0 to 9. The default value for this directive is 1.

GML_INDENT_SIZE 3

Workbench Parameter: Indent Size

REPLACE_TABS_WITH_SPACES

Required/Optional: Optional

By default the Tab character is used to pretty-print the indentations; set this directive to YES to substitute the Tab character with a Space. The size of a single indentation is controlled by the INDENT_SIZE directive. The valid values for this directive are YES and NO. The default value is NO.

GML_REPLACE_TABS_WITH_SPACES YES

Workbench Parameter: Replace Tabs with Spaces

ADE

This directive specifies the name of the Application Domain Extension (ADE), if any, to be used.

Required/Optional

Optional

Values

None | Noise ADE

Mapping File Syntax

CITYGML_ADE NoiseADE

Workbench Parameter

Application Domain Extension

USE_CITYGML_SCHEMA_FILES

If this directive is set to Yes, it uses the core CityGML schema files as well as the schema files specified in the ADE_XSD_DOC directive for writing CityGML elements.

It is recommended that you set this directive to Yes for new workspaces and mapping files in order to 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

Writer 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.

Only feature types found in the specified schema files are written out. Core CityGML schema files are always included for version 1.0 and 2.0.

NoiseADE schema files are also included if ADE directive is set to NoiseADE.

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)

TEXTURE_DIRECTORY

This directive specifies the name of the subfolder to which texture files will be written out, if applicable.

The subfolder name by default is (filename)_appearance, where (filename) is the name of the dataset.

Required/Optional

Optional

Mapping File Syntax

CITYGML_TEXTURE_DIRECTORY SampleData_Appearance

Workbench Parameter

Texture subfolder

THEME_NAME

This directive specifies the name of the theme under which FME Appearances are written in the CityGML instance document.

Required/Optional

Optional

Mapping File Syntax

CITYGML_THEME_NAME FMETheme

Workbench Parameter

Theme name

VERSION

This directive specifies the version of CityGML to be written.

The output documents are quite different, as CityGML changed significantly between these two versions (especially regarding the namespaces in which objects are located).

Required/Optional

Optional

Values

0.4 | 1.0 | 2.0

Mapping File Syntax

CITYGML_VERSION 2.0

Workbench Parameter

CityGML Version for Writing

HEADER_COMMENTS

This directive specifies the XML comments that should be output at the beginning of the output file.

Required/Optional

Optional

Values

Valid XML comments that should be encoded as described in the FME Fundamentals help file, under Mapping File Syntax > Substituting Strings in Mapping Files.

Mapping File Syntax

HEADER_COMMENTS <lt>!--<space>This<space>output<space>is<space>generated<space>by<space>FME<space>--<gt>

Workbench Parameter

Header Comments

SCHEMA_LOCATION

This directive specifies the value of the schemaLocation attribute on CityModel root element.

Required/Optional

Optional

Values

Even pairs of URIs encoded as described in the FME Fundamentals help file, under Mapping File Syntax > Substituting Strings in Mapping Files.

Mapping File Syntax

SCHEMA_LOCATION http:<solidus><solidus>www.opengis.net<solidus>citygml<solidus>1.0<space>http:<solidus>
     <solidus>schemas.opengis.net<solidus>citygml<solidus>1.0<solidus>cityGMLBase.xsd

Workbench Parameter

Schema Location

TEXTURE_OUTPUT_FORMAT

Required/Optional

Optional

Values

PNG | JPEG | GIF | BMP | ECW | ERDAS | GEOTIFF | INGR | JPEG2000 | MRSID | PCIDSK | SGI | TIFF | XPM | Auto (default)

Workbench Parameter

Preferred Texture Format

REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE

Required/Optional

Optional

Values

Yes | No

Workbench Parameter

Remove Auto Generated GML IDs When Possible

USE_CORE_NAMESPACE_PREFIX

Required/Optional

Optional

Values

Yes | No

Workbench Parameter

Use 'core' Namespace Prefix