GML Writer Parameters
GML Version
The GML writer can write a dataset according to an existing GML Application Schema or create the GML Application Schema along with the written dataset.
The “GML Application Schema” option is used in conjunction with the Application Schema parameter. This “GML Application Schema” mode allows the writer to write GML datasets according to existing GML-based standard formats such as AIXM v5.1 or INSPIRE.
The Application Schema parameter is used to specify appropriate XML Schema document.
Setting the parameter to either 3.1.1 or 3.2.1 instructs the writer to create an XSD that is based on the writer feature type definitions. A new XSD document will be created every time.
Note: The GML writer will not write to an existing GML-based standard such as AIXM v5 or INSPIRE in this mode.
Specifies the location of the GML Application Schema .xsd document.
SRS Parameters
This parameter can overwrite the CRS value that is written in the GML instance’s srsName
attributes.
By default, the FME coordinate system name in a feature is transferred directly onto the srsName
attribute. Using this parameter allows you to provide your own URN CRS string for the srsName
attributes.
This parameter is required in conjunction with the GML srsName parameter. It specifies the axis order for a coordinate tuple in a GML <pos> or <posList> element.
The valid values are
- 1,2
- 2,1
- 1,2,3
- 2,1,3
There is no default value.
For example, if GML srsName is set to urn:ogc:def:crs:EPSG:6.6.4326, this parameter should be set to “2,1” so that the coordinates in the GML <pos> and <posList> elements are written in lat-lon order.
Namespace Options
The directive specifies the GML application schema target namespace prefix. The default value for this directive is fme.
This parameter specifies the GML application schema target namespace URI. The default value for this parameter is http://www.safe.com/gml/fme.
Note that a URI is a label only (usually an ownership identifier), and the XML Namespace specification does not require that the URI be used for information retrieval. Using a URI (rather than a simple string) to identify a namespace reduces the probability of different namespaces having duplicate identifiers.
This parameter allows elements in different namespaces, other than the GML and the document target namespace, to be included in the output file.
The legal values for this directive are whitespace-separated XML namespace declarations as they would appear in an XML element.
A schema file is not written when this directive is used, that is, the output XSD file is suppressed.
To control the namespace of a particular element, the FME feature type and/or attribute name must carry the corresponding namespace prefixes declared by this directive.
Pretty Printing
Setting this parameter to Yes ensures the output is neatly formatted. This promotes easier reading on screen and in print output.
- Indent Size: Select a value from 0 to 9.
- Replace Tabs with Spaces: By default the Tab character is used to for indentations. Select Yes to substitute the Tab character with a Space.
- Text Indent: By default, the text in a tag is left untouched. Select Yes to include pretty printing in the text.
Note: Enabling this option produces a considerably larger output file due to added whitespace.
Feature Collection
The root collection element is influenced by this parameter.
- FeatureCollection – In GML 3.1.1 mode, the default collection element is <gml:FeatureCollection>; the Feature Collection NS URI parameter may be used in conjunction with this parameter to change the collection element to <wfs:FeatureCollection>.
Note: <wfs:FeatureCollection> is not supported when writing in GML v3.2.1 mode.
- target-namespace – Changes the root element to <[target-ns-prefix]:FeatureCollection>, where [target-ns-prefix] is the prefix that is bound to the output document target namespace, e.g., <fme:FeatureCollection>. The output xsd document will also include a custom FeatureCollection declaration and FeatureCollectionType definition.
Feature Collection when GML Version is Application Schema This parameter can also be used to specify the local-name of the element that should be used as the feature collection only when the GML Version parameter is set to Application Schema. The specified feature collection must exist in the set of parsed schemas, otherwise FeatureCollection in the GML namespace will be assumed. If the parameter is left empty and if the parent/child relationship for the features in the writer are assembled into several rooted trees, then FeatureCollection will be assumed as the wrapper collection; parent/child relationships are maintained with the gml_id and gml_parent_id attributes. Note that an XML document must have a single rooted element. If the parameter has the local-name of the element and this element corresponds to a feature collection in the set parsed schemas, and: |
||
|
OR |
|
GML v3.2.1 requires a gml:id on every feature and feature collection.
This parameter allows you to supply a custom gml:id value to replace UUID that is automatically assigned for the feature collection under GML v3.2.1.
This parameter is applicable only when the GML Version parameter is set to Application Schema or 3.1.1. It is used to specify the XML Namespace URI for the element name that is specified as the feature collection in the Feature Collection parameter.
For example, to specify the WFS 2.0 "FeatureCollection", set this parameter to "http://www.opengis.net/wfs/2.0" and Feature Collection to the "FeatureCollection" (as specified above, in Feature Collection when GML Version is Application Schema).
Feature Properties
This parameter 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 parameter 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 parameter 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.
Specifies whether the default and optional GML feature properties, name and description, should be read.
The GML writer will automatically substitute concrete elements that are substitutable for abstract GML properties. Some GML formats declare properties that are not abstract but are nevertheless head of substitution groups.
Selecting this parameter instructs the GML writer to also generate FME attributes for member elements belonging to the substitution group headed by these non-abstract GML properties.
The FME feature type and/or attribute names may include the XML Namespace prefixes used in the GML application schema. The prefix will be separated from the names with an underscore.
By default, the prefixes are not added to the names. To include the prefixes in the feature types, select Feature Types. To include the prefixes in both the feature types and attributes select Feature Types and Attributes.
Setting this parameter to Feature Types is necessary when a GML dataset contains feature types with the same name in different namespaces.
Feature Properties – Attribute Handling
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 list attributes within FME features.
If the value is set to XML Fragments, then the complex properties with complex content are mapped as XML fragments.
Some complex properties, such as those that are recursively defined, cannot be mapped as nested lists. These complex properties will always be mapped as XML fragments, regardless of the setting for this parameter.
This optional parameter can control the depth of nested list attributes.
Advanced
Yes: Every GML writer DEF line is translated to the output GML application schema document as an XML Schema element declaration and a corresponding complex type definition.
No (Default): Directs the writer to ignore those DEF lines that have no corresponding feature instances.
Specify the maximum number of decimal place to write to the GML file when writing coordinates.
To specify an exact number of decimal places to write, use this parameter in conjunction with the Minimum Decimal Places parameter.
Value
An integer greater than or equal to 0.
Default value: 15 decimal places.
Specify the minimum number of decimal place write to the GML file when writing coordinates.
To specify an exact number of decimal places to write, use this parameter in conjunction with the Maximum Decimal Places parameter.
Value
An integer greater than or equal to 0.
Default value: 0 decimal places.
This parameter specifies the encoding for the incoming schema and data feature (for example, UTF-8).
If unspecified, the writer assumes that the schema and data features are encoded with the system’s encoding.
Instructs the writer to write out only the .xsd document, only the .gml document, or both documents.
This parameter suppresses the output of the xsi:schemaLocation attribute in the GML instance’s root element. The xsi:schemaLocation in an XML document instance is not a mandatory attribute – it is merely a hint that an XML processor may choose to ignore.
Setting this parameter to Yes suppresses the output of the xsi:schemaLocation attribute in the output GML instance. The default setting is No.
Feature Collection
The root collection element is influenced by this parameter.
- FeatureCollection – In GML 3.1.1 mode, the default collection element is <gml:FeatureCollection>; the Feature Collection NS URI parameter may be used in conjunction with this parameter to change the collection element to <wfs:FeatureCollection>.
Note: <wfs:FeatureCollection> is not supported when writing in GML v3.2.1 mode.
- target-namespace – Changes the root element to <[target-ns-prefix]:FeatureCollection>, where [target-ns-prefix] is the prefix that is bound to the output document target namespace, e.g., <fme:FeatureCollection>. The output xsd document will also include a custom FeatureCollection declaration and FeatureCollectionType definition.
Feature Collection when GML Version is Application Schema This parameter can also be used to specify the local-name of the element that should be used as the feature collection only when the GML Version parameter is set to Application Schema. The specified feature collection must exist in the set of parsed schemas, otherwise FeatureCollection in the GML namespace will be assumed. If the parameter is left empty and if the parent/child relationship for the features in the writer are assembled into several rooted trees, then FeatureCollection will be assumed as the wrapper collection; parent/child relationships are maintained with the gml_id and gml_parent_id attributes. Note that an XML document must have a single rooted element. If the parameter has the local-name of the element and this element corresponds to a feature collection in the set parsed schemas, and: |
||
|
OR |
|
GML v3.2.1 requires a gml:id on every feature and feature collection.
This parameter allows you to supply a custom gml:id value to replace UUID that is automatically assigned for the feature collection under GML v3.2.1.
This parameter is applicable only when the GML Version parameter is set to Application Schema or 3.1.1. It is used to specify the XML Namespace URI for the element name that is specified as the feature collection in the Feature Collection parameter.
For example, to specify the WFS 2.0 "FeatureCollection", set this parameter to "http://www.opengis.net/wfs/2.0" and Feature Collection to the "FeatureCollection" (as specified above, in Feature Collection when GML Version is Application Schema).
Specify an XSLT stylesheet to be applied to the final output document.
The Stylesheet Result parameter may be used in conjunction with this parameter to specify the location and filename of the resulting transformation.
This parameter is valid only in conjunction with the XSLT Stylesheet to Apply parameter.
When this parameter is not defined, the resulting XSLT transformation will have the same location and filename as the output dataset, with the exception that the filename will be prefixed with transformed_.
This parameter is valid only if XSLT Stylesheet to Apply is specified, and it takes precedence over Stylesheet Result.
Note: This parameter suppresses the XML schema .xsd document for output.
When set to Yes, a temporary file is written in the same folder at the location specified in the writer, the stylesheet is applied to the to temporary file, and the result of the transformation is stored in the output dataset file.
This parameter allows elements in different namespaces, other than the GML and the document target namespace, to be included in the output file.
The valid values for this parameter are whitespace-separated XML namespace declarations, as they would appear in an XML element.
A schema file is not written when this directive is used, that is, the output XSD file is suppressed.
To control the namespace of a particular element, the FME feature type and/or attribute name must carry the corresponding namespace prefixes declared by this parameter. The prefix must be separated by an underscore.
For example, in order to write out a <hy-p:Watercourse> feature type element, the FME feature type and hence the FME feature type definition – the DEF line – must be prefixed with hy-p_. For example:
GML_DEF hy-p_Watercourse
The value will need to include the XML namespace declaration for the hy-p prefix. For example:
xmlns:hy-p=”urn:x-inspire:specification:gmlas:HydroPhysicalWaters:3.0”
Values
One or more whitespace-separated XML namespace declarations of the form xmlns:PREFIX=”URI”, where PREFIX is the namespace prefix and URI is the namespace URI. For example:
xmlns:gml=”http://www.opengis.net/gml/3.2”
Determines if FME writes the Geometries as a gml:Polygon or a gml:PolygonPatch.
- No (default value): prints out gml:Surface geometries.
- Yes: FME creates the geometry as a gml:Polygon in the output.
This optional parameter performs validation of the output file against the schemas referenced in that file:
Yes:
- If GML Version is set to 3.1.1 or 3.2.1, the schema used for validating the output file is determined by the version specified.
- If GML Version is set to GML Application Schema, the specified Application Schema is used for validation.
No (default):
- Validation is not performed.
By default, the URL for the target namespace URI - URL location pair in the instance document’s xsi:schemaLocation attribute is the GML application schema’s relative filename. This parameter allows you to overwrite the .xsd filename by supplying a custom URL. This parameter only affects the value of the URL for the target namespace in the xsi:schemaLocation. It does not affect where the Application Schema is written.
Example:
http://www.conurl/ns.xsd
The encoding for the output XML documents, which include both the GML instance and the GML application schema. The default value is UTF-8.
Use Network Authentication
This parameter is always visible in some formats, and visible in other formats only when the dataset is a URL.
Specify the authentication method to use when accessing a password-protected server.
- Basic: (default) Basic access authentication is designed to allow a client to provide credentials to a server on the assumption that the connection between them is trusted and secure. Note that any credentials passed from client to server can be easily intercepted through an insecure connection.
- Digest: Digest authentication is one of the agreed-upon methods a web server can use to negotiate credentials, such as username or password, with a user's web browser.
- NTLM: A challenge-response protocol that is used to provide compatibility with versions of Windows earlier than the Windows 2000 operating systems.
- Web Connection: Web connections provide a convenient and secure way to store and reuse previously established connection parameters. See Web Connection below.
- Single Sign-on: FME will use the credentials of the current user to authenticate the HTTP request. This authentication method currently works only on the Windows operating system.
Note: To access datasets using a proxy server, use the Network tools in FME Options. From the Workbench menu, select Tools > FME Options > Network. For more information, see "Network Proxy" in the FME Workbench Help.