INSPIRE GML Writer Parameters
INSPIRE Themes
- by Themes(default): Enables the INSPIRE Themes parameter.
- by XSD: This option enables the Application Schema parameter, where you can specify a different INSPIRE schema (other than the built-in themes).
When reading schema features or importing feature type definitions into the INSPIRE writer, the INSPIRE reader dataset parameter may be left unset.
Browse a list of the available INSPIRE themes.
FME supports themes up to and including v5.0.
A GML instance document specifies the namespace and the location of its application schema through its root element xsi:schemaLocation attribute. This field allows the GML (or GML-based) 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 of 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.
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 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.
Pretty Printing
Setting this parameter to Yes ensures the output is neatly formatted. This promotes easier reading on screen and in print output. Note, however, that it also produces a considerably larger output file size due to the added whitespace.
- 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.
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>.
- 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 and the Application Schema Parameter This parameter can also be used to specify the local-name of the element that should be used as the feature collection when used in conjunction with 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 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 |
|
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 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 FeatureCollection (as specified above, in Feature Collection when GML Version is Application Schema).
Feature Properties
Specifies whether the default and optional GML feature properties, name and description, should be read.
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.
There are many different feature types with many possible geometries per feature type.
Nameless geometries are ignored by writers in Application Schema mode because they do not correspond to any properties in the .xsd documents.
When this option is checked, the writer will attempt to write out nameless geometries to geometrically compatible properties.
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
Specify the maximum number of decimal places 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
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
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.
The legal values for this parameter are whitespace-separated XML namespace declarations as they would appear in an XML element.
When an Application Schema mode is not selected, this parameter allows elements in different namespaces, other than the GML and the document target namespace, to be included in the output file. A schema file is not written when this parameter 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.
When an Application Schema mode is selected, this parameter allows different namespace declarations other the ones extracted from the parsed XSD documents be used in the output document. The parameter may be used to control prefixes (for example, to use the default namespace), and also to trim the number of namespace declarations written to the top level element.
One use of this namespace declaration parameter is to set the default namespace in order to remove the namespace prefix from the element names.
For example, consider <gn:NamedPlace>. To remove the gn namespace prefix, you will have to make the namespace associated with gn the default namespace. Looking at the namespace header of the default output, you will see that:
xmlns:gn="urn:x-inspire:specification:gmlas:GeographicalNames:3.0"
To remove this namespace, you will have to set Override XSD and Use Namespace Declarations to: xmlns="urn:x-inspire:specification:gmlas:GeographicalNames:3.0"
Thereafter, the output will contain <NamedPlace>, not <gn:NamedPlace>.
This optional parameter performs validation of the output file against the schemas referenced in that file:
Yes:
- If Select Feature Types is set to by Themes, the INSPIRE Themes are used for validation.
- If Select Feature Types is set to by XSD, the specified Application Schema is used for validation.
No (default):
- Validation is not performed.
A gml_id geometry trait, if present, is used to populate the gml:id attribute of a GML geometry element. For example, an FME Point with the gml_id trait will be written as <gml:Point gml:id="…">.
- Yes – A gml:id will be automatically generated for GML geometries without a corresponding gml_id geometry trait.
- No – This is the default value.
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.
The parameter only affects the value of the URL for the target namespace in the xsi:schemaLocation. It does not affect where the application schema will be written (for this, see the Application Schema parameter). The parameter should have exactly one URL value indicating the XSD location for the target namespace URI.
If the parameter has multiple values, then they must be whitespace-separated URI–URL pairs. This option allows the user to provide a complete custom xsi:schemaLocation for the output document.
Example:
http://www.conurl/ns.xsd
Specifies the encoding to use for the output XML documents, which include both the GML instance and the GML application schema.
If this parameter is left blank, the value UTF-8 will be used.