Reader Directives

 

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

DATASET

Required/Optional

Required

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

Example:

GML_DATASET c:\gml_data\hydro.xml

Workbench Parameter: Source Geography Markup Language (GML) File(s)

SYSTEM_ENCODING

Required/Optional: Optional

Example:

GML_SYSTEM_ENCODING UTF-8

Workbench Parameter: System Encoding

IGNORE_APPLICATION_SCHEMA

If YES, the GML reader attempts to read the GML dataset without an application schema.

Values

YES | NO (default)

XSD_DOC

Required/Optional: Optional

A GML instance document specifies the namespace and the location of its application schema through its root element xsi:schemaLocation attribute. This directive allows the GML reader to use a different GML schema document from the one specified in the xsi:schemaLocation attribute.

The XML Schema specification states that the xsi:schemaLocation attribute value consists of a set of pairs: The first member each pair is the namespace for which the second member is the hint describing where to find an appropriate schema document. The presence of this hint does not require the processor to obtain or use the cited schema document, however, the processor is free to use other schemas obtained by other suitable means.

The XSD_DOC directive allows the usage of other schema documents on the instance besides the one stated in the instance’s xsi:schemaLocation attribute.

Note: This directive only takes effect if the target namespace of the dataset is not in the Safe fixed schema namespace http://www.safe.com/xml/schemas/FMEFeatures. The GML2 writer in FIXED SCHEMA_MODE writes out documents that belong to that namespace.

Workbench Parameter: Application Schema

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

IGNORE_SCHEMA_LOCATION_IN_DATASET NO

Workbench Parameter

Ignore xsi:schemaLocation in Dataset

MAP_EMBEDDED_OBJECTS_AS

This directive specifies how embedded GML objects (those containing a gml:id), that are not geometries should be mapped.

By default, these embedded objects are mapped into FME attributes.

If the directive is set to GEOMETRIES the embedded objects are mapped into FME Geometries and the embedded object properties are loaded into geometric traits. In turn, nested embedded objects are mapped into nested aggregate geometries.

If the directive is set to FEATURE_TYPES the embedded objects will be mapped into separate FME feature types, and these feature types will have an additional gml_parent_id attribute whose value refers back to its parent feature.

Required/Optional

Optional

Values

ATTRIBUTES (default) | GEOMETRIES | FEATURE_TYPES

Mapping File Syntax

GML_MAP_EMBEDDED_OBJECTS_AS FEATURE_TYPES

Workbench Parameter

Map Embedded Objects As

MAP_PREDEFINED_GML_PROPERTIES

Required/Optional: Optional

This directive specifies if the default and optional GML feature properties, name and description, should be read. The valid values of this directive are YES and NO, its default value is NO.

Example:

GML_MAP_PREDEFINED_GML_PROPERTIES YES

Workbench Parameter: Map Predefined Properties

CONTINUE_ON_GEOM_ERROR

Required/Optional: Optional

Example:

GML_CONTINUE_ON_GEOM_ERROR NO

Workbench Parameter: Continue on Geometry Error

HTTP_AUTH_USER

This optional directive specifies the user name when accessing a password protected HTTP server.

The directive has no default value.

Required/Optional

Optional

Mapping File Syntax

<ReaderKeyword>_HTTP_AUTH_USER someusername

Workbench Parameter

HTTP Authentication User

HTTP_AUTH_PASSWORD

This optional directive specifies the password when accessing a password protected HTTP server. The directive has no default value.

Required/Optional

Optional

Mapping File Syntax

<ReaderKeyword>_HTTP_AUTH_PASSWORD my123secret

Workbench Parameter

HTTP Authentication Password

HTTP_AUTH_METHOD

This optional directive specifies the authentication method when accessing a password protected HTTP server.

Values

Basic (default) | Digest | NTLM

Required/Optional

Optional

Mapping File Syntax

<ReaderKeyword>_HTTP_AUTH_METHOD Digest

Workbench Parameter

HTTP Authentication Method

HTTP_PROXY

Required/Optional: Optional

This directive specifies the HTTP proxy to be used for network fetches. The port number may be specified at the end of the proxy by appending :[port number] or through the HTTP_PROXY_PORT directive.

Example:

GML_HTTP_PROXY www.someproxy.net

or

GML_HTTP_PROXY www.someproxy.net:8082

Note: Users may bypass the HTTP_PROXY and HTTP_PROXY directives and still have http proxy support by specifying the http_proxy environment variable. The value for this environment variable should be of the form [protocol://][user:password@]machine[:port], where components within [] are optional. An example value for the http_proxy environment variable is: http://www.someproxy.net:8885.

Workbench Parameter: Proxy Address 

HTTP_PROXY_PORT

Required/Optional: Optional

This directive is used if the HTTP proxy port was not specified in the HTTP_PROXY directive.

Example:

GML_HTTP_PROXY_PORT 8081

Workbench Parameter: Port

HTTP_PROXY_USER

Required/Optional: Optional

This optional directive specifies the user name when accessing a password protected proxy server.

Example:

GML_HTTP_PROXY_USER someusername

Workbench Parameter: Proxy Username

HTTP_PROXY_PASSWORD

Required/Optional: Optional

This optional directive specifies the password when accessing a password protected proxy server.

Example:

GML_HTTP_PROXY_PASSWORD my123secret

Workbench Parameter: Proxy Password

HTTP_PROXY_METHOD

Required/Optional: Optional

This optional directive specifies the authentication method when accessing a password protected proxy server.

Values

Basic (default) | Digest | NTLM

Example:

GML_HTTP_PROXY_AUTH_METHOD Digest

Workbench Parameter: Proxy Authentication Method

CACHE_XSD

Required/Optional: Optional

Example:

GML_CACHE_XSD NO

Workbench Parameter: Cache XSD Document

CACHE_XSD_EXPIRY_TIME

Required/Optional: Optional

Example:

GML_CACHE_XSD_EXPIRY_TIME 600

Workbench Parameter: Cache XSD Expiry Time

CACHE_XSD_DIRECTORY

Required/Optional: Optional

This optional directive takes effect when CACHE_XSD directive is set to YES. The directive specifies the folder path for the location of the cache xsd folder, the folder name for the cache xsd folder is specified by the CACHE_XSD_NAME directive below. The default value for this directive is the user’s temporary folder.

Example:

GML_CACHE_XSD_DIRECTORY c:\tmp

CACHE_XSD_NAME

Required/Optional: Optional

This optional directive specifies the xsd cache name. The cache name must also be a valid folder name, as this value is used as the sub-folder containing the cached schema documents within the CACHE_XSD_DIRECTORY. The default value for this directive is GML_XSD_CACHE.

Example:

GML_CACHE_XSD_NAME gml_schema_cache

XFMAP

Required/Optional: Optional

This optional directive is not for general usage.

Rather than having the reader programmatically generate an xfMap from the GML application schema, this directive directs the reader to use a predefined xfMap on the input GML dataset.

Multiple xfMaps on the same input stream may be used. These can either be specified by using several XFMAP directives or through a single quoted value XFMAP directive where each xfMap in the quoted string is separated by a semicolon.

Example:

GML_XFMAP C:\tmp\data\features.xmp

or

GML_XFMAP “C:\tmp\drainages.xmp;C:\tmp\pits_pipes.xmp”

or

GML_XFMAP C:\tmp\drainages.xmp
GML_XFMAP C:\tmp\pits_pipes.xmp

XFMAP_SCHEMA

Required/Optional: Optional

This optional directive is not for general usage. When reading schemas, the GML reader construct FME schema features after examining the GML application schema corresponding to the input dataset, this directive allows the GML reader to bypass the GML application schema by constructing FME schema features with a predefined xfMap.

Example:

GML_XFMAP_SCHEMA C:\tmp\data\schema_features.xmp

SRS_AXIS_ORDER

This optional directive overrides the axis order when reading <TocEntry Title="SRS_AXIS_ORDER" Link="/Content/gml/SRS_AXIS_ORDER.htm" /> a coordinate tuple in a GML <pos> or <posList> element.

Values

The valid values for this directive are “1,2”, “2,1”, “1,2,3” and “2,1,3”. There is no default value.

For example, if the srsName in the GML document is set to "urn:ogc:def:crs:EPSG:6.6.4326", and the user is sure that the coordinate order in the GML document is lon-lat and not lat-lon order, then this directive should be set to "1,2" so that the reader reads the data in lon-lat order.

Mapping File Syntax

GML_SRS_AXIS_ORDER 1,2

Required/Optional

Optional

Workbench Parameter

GML SRS Axis Order

MAP_COMPLEX_PROPERTIES_AS

This directive specifies whether GML properties that are defined as a complex type with complex content (that is, those that have embedded children elements) should be mapped as nested attributes or XML fragments within FME features.

Some complex properties, such as those that are recursively defined, cannot be mapped as nested attributes. These complex properties will always be mapped as XML fragments, regardless of the value of this directive.

Values

NESTED_ATTRIBUTES (default) | XML_FRAGMENTS

If the value is set to XML_FRAGMENTS, then the complex properties with complex content are mapped as XML fragments.

Required/Optional

Optional

Mapping File Syntax

GML_COMPLEX_PROPERTIES_AS XML_FRAGMENTS

Workbench Parameter

Complex Properties as

XML_FRAGMENTS_AS_DOCUMENTS

This directive specifies whether GML properties that are mapped as XML fragments should be converted into XML documents.

The conversion will add missing namespace declarations to the fragments, it will maintain CDATA sections, and it will also prefix an XML header declaration to the fragment. Converting the XML fragments into XML documents allows XML-based parsers, e.g., XSLT and XQuery based processors, to further process the fragments.

Values

YES (default) | NO

Required/Optional

Optional

Mapping File Syntax

GML_XML_FRAGMENTS_AS_DOCUMENTS NO

Workbench Parameter

Include XML Declaration in XML Fragments

FLATTEN_XML_FRAGMENTS

This directive specifies whether GML properties that are mapped as XML fragments should be flattened into nested attributes.

The flattening will only be applied to the data features carrying the XML fragments, hence the new flattened nested attributes will not be reflected in the FME feature type schema definitions.

Values

YES | NO (default)

Required/Optional

Optional

Mapping File Syntax

GML_FLATTEN_XML_FRAGMENTS YES

Workbench Parameter

Flatten XML Fragments

FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE

This directive works in conjunction with the FLATTEN_XML_FRAGMENTS_DIRECTIVE, it specifies the character to use as the open brace for the flattened list attributes, the open brace defaults to “{“.

Values

Any single character, “{“, with the open curly brace being the default value.

Required/Optional

Optional

Mapping File Syntax

GML_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE {

Workbench Parameter

Substitute Open List Brace

FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE

This directive works in conjunction with the FLATTEN_XML_FRAGMENTS_DIRECTIVE, it specifies the character to use as the close brace for the flattened list attributes, the close brace defaults to “}“.

Values

Any single character, “}“, with the close curly brace being the default value.

Required/Optional

Optional

Mapping File Syntax

GML_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE {

Workbench Parameter

Substitute Close List Brace

FLATTEN_XML_FRAGMENTS_SEPARATOR

This directive works in conjunction with the FLATTEN_XML_FRAGMENTS_DIRECTIVE, it specifies the string to use as the separator for components within the nested attributes. The nested attribute component separator defaults to “.“.

Values

Any string, “.“, with the period being the default value.

Required/Optional

Optional

Mapping File Syntax

GML_FLATTEN_XML_FRAGMENTS_SEPARATOR .

Workbench Parameter

Substitute Element List Separator

MAP_GEOMETRY_COLUMNS

This directive specifies whether the GML geometric properties should be represented as individual, and possibly multiple, geometry columns in FME feature type definitions.

A geometric column in an FME data feature is represented either as a single named geometry, or, if multiple geometry columns are present, as an aggregate geometry with multiple named geometry components, this aggregate geometry will also have its “Contains Individual Geometries” interpretation flag set.

A new attribute type has also been introduced for specifying the order and/or position of a geometric column in the feature type definition. If an attribute X has its type set to “xml_geometry” then this attribute X becomes a placeholder in the feature type definition. It is a placeholder because actual data features for the feature type definitions will not have this attribute; instead, the data features will have a geometry named “X”.

Values

YES (default) | NO

Required/Optional

Optional

Mapping File Syntax

GML_MAP_GEOMETRY_COLUMNS NO

Workbench Parameter

Map Geometry Columns

USE_OLD_READER

This optional directive instructs the GML reader to use the older GML v3.1.1 code base to read GML v3.1.1 and v2.1.2 documents.

Values

YES | NO (default)

Required/Optional

Optional

Mapping File Syntax

GML_USE_OLD_READER YES

Workbench Parameter

Use Old Reader for GML v3.1.1 and v2.1.2 Documents

DISABLE_XML_NAMESPACE_PROCESSING

This directive disables XML Namespace processing for the underlying XML parser. Note that this may cause reading errors if the GML schema and the GML data use different prefixes for the same namespace URI. The directive may be useful for datasets that are not XML Namespace valid.

Values

YES | NO (default)

Required/Optional

Optional

Mapping File Syntax

GML_DISABLE_XML_NAMESPACE_PROCESSING YES

Workbench Parameter

Disable XML Namespace Processing

ADD_NAMESPACE_PREFIX_TO_NAMES

Instructs the GML reader to include the XML Namespace prefixes, used in the GML application schema, in the FME feature type and attribute names. The prefixes are separated from FME names with an underscore.

Values

YES | NO (default)

Required/Optional

Optional

Mapping File Syntax

GML_ADD_NAMESPACE_PREFIX_TO_NAMES YES

Workbench Parameter

Add XML Namespace Prefix to Names

DISABLE_AUTOMATIC_READER_TYPE_SELECTION

Values

YES | NO (default)

Required/Optional

Optional

Mapping File Syntax

GML_DISABLE_AUTOMATIC_READER_TYPE_SELECTION YES

Workbench Parameter

Disable Automatic Reader Type Selection

SRS_ANGLE_DIRECTION

Values

CCW | CW

Required/Optional

Optional

Mapping File Syntax

GML_SRS_ANGLE_DIRECTION CW

Workbench Parameter

GML SRS Angle Direction

ENFORCE_PATH_CONTINUITY_BY

Values

SNAPPING_END_POINTS (default) | INSERTING_NEW_SEGMENT

Required/Optional

Optional

Mapping File Syntax

GML_ENFORCE_PATH_CONTINUITY_BY INSERTING_NEW_SEGMENT

Workbench Parameter

Enforce Path Continuity By

QNAMES_FOR_PROPERTIES_TO_IGNORE

Required/Optional

Optional

Values

Whitespace-separated XML QNames, qualified names, prefixed or unprefixed.

Workbench Parameter

Properties to Ignore

ADD_GEOMETRIES_AS_XML_FRAGMENTS

Required/Optional

Optional

Values

YES | NO

Workbench Parameter

Add Geometries as XML Fragments

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