Elements representing properties GML application schemas

Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. 229 andor replacement by a member of a substitution group. Such complex types designed for derivation by restriction are appropriate ―library types‖ for elements in substitution groups that cross namespaces. If the value of the property is expected to be available elsewhere, the type of the property element shall support referencing the GML object that is the value of the property see 21.2.6. If the value of the property is expected to be represented inline, the type of the property element shall support this, either by having XML Schema simple content of the appropriate simple type or by containing the GML object that is the value of the property inline see 21.2.6. If the value of the property is expected to be available either elsewhere, or represented inline, then the type of the property element shall support both methods. In this case the type for the property element shall have the gml:AssociationAttributeGroup, in which all members are optional, and the child element shall have minOccurs=0 so that in an instance document the property element may be empty if it carries an xlink see 7.2.3. If it is desired to prohibit the possibility of both xlink attributes and content, or neither, then this constraint should be recorded as a normative directive in an annotation element on the element declaration in the GML application schema. The directive may be expressed as prose, or it may be expressed using a formal notation such as Schematron.

21.3 Schemas defining Features and Feature Collections

21.3.1 Introduction

Features and feature collections are the primary view of geospatial information supported by GML, and are particularly useful in modelling real world geography or in defining message types for geographic web services. A feature models a real world object or concept, see Clause 9. Feature application schemas define geographic features and feature collections for a specific application domain or community. These GML application schemas shall obey the additional rules described in the following subclauses.

21.3.2 Import GML schema components

The application schema shall import the GML schema as described in 21.2.3. Any GML profile referenced from the application schema shall include at least the gml:AbstractFeature element and all schema components used by this element.

21.3.3 Elements representing features

All geographic features and feature collections in the application schema shall be declared as global elements in the schema, i.e. they shall be immediate child elements of the XML Schema schema element. The name of an element that instantiates a GML feature shall be its feature type, in the sense described in ISO 19109. An element representing a feature shall be either directly or indirectly in the substitution group of gml:AbstractFeature. An element representing a feature collection type shall be either directly or indirectly in the substitution group of gml:AbstractFeature and have in its content model a property element whose content model is derived by extension from gml:AbstractFeatureMemberType. In a GML application schema, an object that is an abstraction of a real world phenomenon shall be modelled as a feature. All other objects shall be modelled as a GML object that is not a feature, i.e. the element representing the 230 Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. object shall be either directly or indirectly in the substitution group of gml:AbstractGML, but neither directly nor indirectly in the substitution group of gml:AbstractFeature.

21.3.4 Application features are features

A feature defined in an application schema shall conform to the rules respecting GML features as described in Clause 9 and conform to the rules described in Clause 7. NOTE 1 The name of a feature element is the semantic type of the feature. NOTE 2 The children of a feature element are always property elements that describe the feature, and such properties are always encoded as child elements. Properties are not encoded as XML attributes.

21.4 Schemas defining spatial geometries

21.4.1 Import GML geometry schema components

The application schema shall import the GML schema as described in 21.2.3. Any GML profile referenced from the application schema shall include at least the gml:AbstractGeometry element and all schema components used by this element. NOTE Typically additional geometry schema components are required besides those required by gml:AbstractGeometry. In practice, especially concrete elements and types like gml:Point and gml:PointPropertyType will typically be part of the profile. 21.4.2 User-defined geometry types and geometry property types 21.4.2.1 User-defined geometry types Authors of application schemas may create their own geometry types if GML lacks the desired construct. To do this, authors shall ensure that the object elements of these concrete geometry and geometry collection types are in the substitution group either directly or indirectly of the corresponding GML object element: gml:AbstractGeometry. EXAMPLE The following element and complex type definition in an application schema extends gml:Point and adds a bearing e.g. for the orientation of a symbol in portrayal. element name=PointWithBearing type=ex:PointWithBearingType substitutionGroup=gml:Point complexType name=PointWithBearingType complexContent extension base=gml:PointType sequence element name=bearing type=gml:AngleType sequence extension complexContent complexType Any user-defined geometry subtypes shall inherit the elements and attributes of the base GML geometry types without restriction, but may extend these base types to meet application requirements, such as providing a finer degree of interoperability with legacy systems and data sets. All rules specified in Clause 7, Clause 10, 10.5.10 and Clause 11 shall be followed.