GMLAS - Metadata layers

This page details the structure of the extra metadata layers reported by the GMLAS driver.

_ogr_fields_metadata layer

This layer gives metadata about OGR fields, and also "abstract" fields that describe the relation ship between a parent and child layer.

Its structure is:

Field nameDescription
layer_nameName of the layer to which the field belongs to
field_nameName of the field. May be null when field_category is PATH_TO_CHILD_ELEMENT_NO_LINK or GROUP
field_xpathXPath of the element/attribute whose content is used for the field. The XPath is relative to the element that is the direct parent of this element/attribute, or a parent element in case of flattening. May be null for a field generated by OGR.
field_typethe XML schema base data type (string, int, long, ID, ...). Extended with "geometry". May be null for a field generated by OGR
field_is_listWhether the XML type is a list.
field_min_occursInteger value with the minimum number of occurrences of values. 0 or 1 typically. Or more for array types. May be null for a field generated by OGR
field_max_occursInteger value with the maximum number of occurrences of values. 1 typically. Or more for array types. 2147483647 means unlimited. May be null for a field generated by OGR
field_repetition_on_sequenceBoolean value to indicate if the field is related to a <sequence maxOccurs=">1 or unbounded"> construct. Only set when field_max_occurs is not 0 or 1.
field_default_valueDefault value of the field, or null
field_fixed_valueFixed value of the field, or null
field_categoryCategory of the field. May be REGULAR, PATH_TO_CHILD_ELEMENT_NO_LINK, PATH_TO_CHILD_ELEMENT_WITH_LINK, PATH_TO_CHILD_ELEMENT_WITH_JUNCTION_TABLE, GROUP or SWE_FIELD. May be null for a field generated by OGR.
field_related_layerName of the child layer for field_category != REGULAR
field_junction_layerName of the junction layer. Only set if field_category is equal to PATH_TO_CHILD_ELEMENT_WITH_JUNCTION_TABLE
field_documentationDocumentation from the schema.

Explanation of field_category values:

_ogr_layers_metadata layer

This layer gives metadata about OGR layers.

Its structure is:

Field nameDescription
layer_nameName of the layer
layer_xpathXPath of the element that is used as the root element for the layer. May be suffixed with ";extra=XXXX" for group constructs or repeated sequences of repeated elements, so as to distinguish for the XPath of their parent element. Will be null for junction tables or SWE_DATA_ARRAY layers.
layer_categoryCategory of the layer. One of TOP_LEVEL_ELEMENT, NESTED_ELEMENT, JUNCTION_TABLE or SWE_DATA_ARRAY
layer_pkid_nameName of the primary key field. This is the text attribute that uniquely identified a feature (in its layer). This is the XML attribute/name of type xs:ID when it exists, otherwise a "ogr_pkid" field is automatically created. Will be null for SWE_DATA_ARRAY layers.
layer_parent_pkid_nameName of the field that is a foreign key to the parent layer of this layer. Only set for a NESTED_ELEMENT layer.
layer_documentationDocumentation from the schema.

_ogr_layer_relationships layer

This layer gives metadata about relationship between OGR layers.

Its structure is:

Field nameDescription
parent_layerName of the parent layer
parent_pkidName of the primary key of the parent layer
parent_element_nameName of the XML element that links from the parent to the child. Will be null when the child layer is due to group constructs or repeated sequences of repeated elements of the parent.
child_layerName of the child layer
child_pkidName of the primary key of the child layer. Will be null for SWE_DATA_ARRAY layers

_ogr_other_metadata layer

This layer contains key / value pairs with different information.

Its structure is:

Field nameDescription
keyName of the metadata item
valueValue of the metadata imtem

Possible keys are :

See Also