Elements representing features Schemas defining Features and Feature Collections

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. Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. 231

21.4.2.2 User-defined geometry property types

Furthermore, authors of application schemas may create their own geometry property types that encapsulate geometry types which are defined in Clause 10, 10.5.10 or Clause 11 or which they have defined in accordance with 21.4.2.1. They shall ensure that these properties follow the pattern used by gml:GeometryPropertyType for standard properties and gml:GeometryArrayPropertyType for array properties. The target type shall be a bona fide geometry object element. A geometry property type may be a restriction of gml:GeometryPropertyType, but this is not a requirement. Nevertheless, every geometry property shall follow the pattern of this type. An application schema may support the choice between an inline or a by-reference semantic or it may restrict the use to either inline prohibit the use of the Xlink attributes or by-reference prohibit the containment of the geometry in the feature. A geometry array property type may be a restriction of gml:GeometryArrayPropertyType, but this is not a requirement. Nevertheless, every geometry property shall follow the pattern of this type. All geometry elements in the array are contained inline in the containing object, only inline semantics is supported by array properties. EXAMPLE The following complex type definitions in an application schema define a ―standard‖ property type for a user- defined geometry type and an array property type for the same geometry type. complexType name=MyGeometryPropertyType sequence element ref=foo:PointWithBearingType minOccurs=0 sequence attributeGroup ref=gml:AssociationAttributeGroup attributeGroup ref=gml:OwnershipAttributeGroup complexType complexType name=MyGeometryArrayPropertyType sequence element ref=foo:PointWithBearingType minOccurs=0 maxOccurs=unbounded sequence complexType

21.5 Schemas defining spatial topologies

21.5.1 Import GML topology 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:AbstractTopology element and all schema components used by this element. NOTE Typically additional topology schema components are required besides those required by gml:AbstractTopology. In practice, especially concrete elements and types like gml:Edge and gml:DirectedEdgePropertyType will typically be part of the profile. EXAMPLE Import the GML schema for example as follows using a schema document of Annex C: import namespace=http:www.opengis.netgml3.2 schemaLocation=..gml.xsd