<?xml version="1.0" encoding="UTF-8"?>
<!-- CityGML Version No. 1.0.0, May 19th, 2008-->
<!-- CityGML - GML3 application schema for the 3D city model of the Special Interest Group 3D (SIG 3D) of GDI NRW-->
<!-- Editors: PD Dr. Gerhard Groeger, Institute for Geodesy and Geoinformation, University of Bonn & -->
<!-- Prof. Dr. Thomas H. Kolbe, Institute for Geodesy and Geoinformation Science, Technical University of Berlin -->
<!-- For further information see: www.citygml.org -->
<!-- For the history of changes and additions to this CityGML schema see file history.txt -->
<xs:schema xmlns="http://www.opengis.net/citygml/waterbody/1.0" xmlns:core="http://www.opengis.net/citygml/1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml"
    targetNamespace="http://www.opengis.net/citygml/waterbody/1.0" elementFormDefault="qualified"
    attributeFormDefault="unqualified">
    <xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd"/>
    <xs:import namespace="http://www.opengis.net/citygml/1.0" schemaLocation="http://schemas.opengis.net/citygml/1.0/cityGMLBase.xsd"/>
    <!-- ========================================================================================= -->
    <!-- ==============================CityGML WaterBody module ===================================== -->
    <!-- ========================================================================================= -->
    <xs:complexType name="AbstractWaterObjectType" abstract="true">
        <xs:annotation>
            <xs:documentation>Type describing the abstract superclass for water objects. As subclass of _CityObject, a
                _WaterObject inherits all attributes and relations, in particular an id, names, external references, and
                generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfWaterObject" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="_WaterObject" type="AbstractWaterObjectType" substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWaterObject" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="WaterBodyType">
        <xs:annotation>
            <xs:documentation>Type describing Water Bodies, e.g., lakes, rivers. As subclass of _CityObject, a WaterBody inherits
                all attributes and relations, in particular an id, names, external references, and generalization relations.
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="AbstractWaterObjectType">
                <xs:sequence>
                    <xs:element name="class" type="WaterBodyClassType" minOccurs="0"/>
                    <xs:element name="function" type="WaterBodyFunctionType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="usage" type="WaterBodyUsageType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="lod0MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod0MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod1MultiCurve" type="gml:MultiCurvePropertyType" minOccurs="0"/>
                    <xs:element name="lod1MultiSurface" type="gml:MultiSurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod1Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod2Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod3Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="lod4Solid" type="gml:SolidPropertyType" minOccurs="0"/>
                    <xs:element name="boundedBy" type="BoundedByWaterSurfacePropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="_GenericApplicationPropertyOfWaterBody" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="WaterBody" type="WaterBodyType" substitutionGroup="_WaterObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWaterBody" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:simpleType name="WaterBodyClassType">
        <xs:annotation>
            <xs:documentation>Class of a Water Body. The values of this type are defined in the XML file WaterBodyClassType.xml,
                according to the dictionary concept of GML3. </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <!-- ========================================================================================= -->
    <xs:simpleType name="WaterBodyFunctionType">
        <xs:annotation>
            <xs:documentation>Function of a Water Body. The values of this type are defined in the XML file
                WaterBodyFunctionType.xml, according to the dictionary concept of GML3. </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <!-- ========================================================================================= -->
    <xs:simpleType name="WaterBodyUsageType">
        <xs:annotation>
            <xs:documentation>Actual usage of a water body. The values of this type are defined in the XML file
                WaterBodyUsageType.xml, according to the dictionary concept of GML3. </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <!-- ========================================================================================= -->
    <xs:complexType name="BoundedByWaterSurfacePropertyType">
        <xs:annotation>
            <xs:documentation>Denotes the relation of a WaterBody to its boundary surfaces, which are of type
                _WaterBoundarySurface. The BoundedByWaterSurfacePropertyType element must either carry a reference to a
                _WaterBoundarySurface object or contain a _WaterBoundarySurface object inline, but neither both nor none.
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:restriction base="gml:AssociationType">
                <xs:sequence minOccurs="0">
                    <xs:element ref="_WaterBoundarySurface"/>
                </xs:sequence>
            </xs:restriction>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:complexType name="AbstractWaterBoundarySurfaceType" abstract="true">
        <xs:annotation>
            <xs:documentation>A WaterBoundarySurface is a thematic object which classifies surfaces bounding a water body.
            </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="core:AbstractCityObjectType">
                <xs:sequence>
                    <xs:element name="lod2Surface" type="gml:SurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod3Surface" type="gml:SurfacePropertyType" minOccurs="0"/>
                    <xs:element name="lod4Surface" type="gml:SurfacePropertyType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfWaterBoundarySurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="_WaterBoundarySurface" type="AbstractWaterBoundarySurfaceType" abstract="true"
        substitutionGroup="core:_CityObject"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWaterBoundarySurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:simpleType name="WaterLevelType">
        <xs:annotation>
            <xs:documentation>Type for the specification of the level of a water surface. The optional attribute waterLevel of a
                WaterSurface can be used to describe the water level, for which the given 3D surface geometry was acquired. This
                is especially important, when the water body is influenced by the tide. The values of this type are defined in the
                XML file WaterLevelType.xml, according to the dictionary concept of GML3. </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <!-- ========================================================================================= -->
    <xs:complexType name="WaterSurfaceType">
        <xs:annotation>
            <xs:documentation>Type describing the surface of a water body, which separates the water from the air. As subclass of
                _CityObject, a WaterSurface inherits all attributes and relations, in particular an id, names, external
                references, and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="AbstractWaterBoundarySurfaceType">
                <xs:sequence>
                    <xs:element name="waterLevel" type="WaterLevelType" minOccurs="0"/>
                    <xs:element ref="_GenericApplicationPropertyOfWaterSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="WaterSurface" type="WaterSurfaceType" substitutionGroup="_WaterBoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWaterSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="WaterGroundSurfaceType">
        <xs:annotation>
            <xs:documentation>Type describing the ground surface of a water body, i.e. the boundary to the digital terrain model.
                As subclass of _CityObject, a WaterGroundSurface inherits all attributes and relations, in particular an id,
                names, external references, and generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="AbstractWaterBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfWaterGroundSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="WaterGroundSurface" type="WaterGroundSurfaceType" substitutionGroup="_WaterBoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWaterGroundSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
    <xs:complexType name="WaterClosureSurfaceType">
        <xs:annotation>
            <xs:documentation>Type describing the closure surface between water bodys. As subclass of _CityObject, a
                WaterClosureSurface inherits all attributes and relations, in particular an id, names, external references, and
                generalization relations. </xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="AbstractWaterBoundarySurfaceType">
                <xs:sequence>
                    <xs:element ref="_GenericApplicationPropertyOfWaterClosureSurface" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    <!-- ========================================================================================= -->
    <xs:element name="WaterClosureSurface" type="WaterClosureSurfaceType" substitutionGroup="_WaterBoundarySurface"/>
    <!-- ========================================================================================= -->
    <xs:element name="_GenericApplicationPropertyOfWaterClosureSurface" type="xs:anyType" abstract="true"/>
    <!-- ========================================================================================= -->
</xs:schema>

