<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:atm="http://www.opengis.net/atm/2.0" xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:eop="http://www.opengis.net/eop/2.0" targetNamespace="http://www.opengis.net/atm/2.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.0">
    <annotation>
        <documentation>Atmospheric products applicaiton schema.
        
        Earth Observation Metadata profile of Observations and Measurements is an OGC Standard.
        Copyright (c) 2013 Open Geospatial Consortium. 
        To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
        </documentation>
    </annotation>
    <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
    <import namespace="http://www.opengis.net/eop/2.0" schemaLocation="eop.xsd"/>
    <import namespace="http://www.opengis.net/ows/2.0" schemaLocation="http://schemas.opengis.net/ows/2.0/owsAll.xsd"/>
    <element name="EarthObservationResult" substitutionGroup="eop:EarthObservationResult" type="atm:EarthObservationResultType"/>
    <complexType name="EarthObservationResultType">
        <complexContent>
            <extension base="eop:EarthObservationResultType">
                <sequence>
                    <element maxOccurs="unbounded" minOccurs="0" name="dataLayers" type="atm:DataLayerPropertyType">
                        <annotation>
                            <documentation>data layers</documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="cloudCoverPercentage" type="gml:MeasureType">
                        <annotation>
                            <documentation>Cloud cover percentage (uom should be %)</documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="cloudCoverPercentageAssessmentConfidence" type="gml:MeasureType">
                        <annotation>
                            <documentation>Cloud cover assessment confidence. Expressed in percents
</documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="cloudCoverPercentageQuotationMode" type="atm:PercentageCoverQuotationModeValueType">
                        <annotation>
                            <documentation>Indicator to know how the cloud cover percentage has been calculated </documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="snowCoverPercentage" type="gml:MeasureType">
                        <annotation>
                            <documentation>Cloud cover percentage (uom should be %)</documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="snowCoverPercentageAssessmentConfidence" type="gml:MeasureType">
                        <annotation>
                            <documentation>Snow cover assessment confidence. Expressed in percents</documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="snowCoverPercentageQuotationMode" type="atm:PercentageCoverQuotationModeValueType">
                        <annotation>
                            <documentation>Indicator to know how the snowcover percentage has been calculated </documentation>
                        </annotation>
                    </element>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="EarthObservationResultPropertyType">
        <sequence minOccurs="0">
            <element ref="atm:EarthObservationResult"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="EarthObservationEquipment" substitutionGroup="eop:EarthObservationEquipment" type="atm:EarthObservationEquipmentType">
        <annotation>
            <documentation>Extension of EOP EarthObservationEquipment - extended to use atm:Acquisition.</documentation>
        </annotation>
    </element>
    <complexType name="EarthObservationEquipmentType">
        <complexContent>
            <extension base="eop:EarthObservationEquipmentType">
                <sequence>
                    <element maxOccurs="1" minOccurs="0" name="acquisition" type="eop:AcquisitionPropertyType">
                        <annotation>
                            <documentation>atm specific acquisition.</documentation>
                        </annotation>
                    </element>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="EarthObservationEquipmentPropertyType">
        <sequence minOccurs="0">
            <element ref="atm:EarthObservationEquipment"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="EarthObservation" substitutionGroup="eop:EarthObservation" type="atm:EarthObservationType">
        <annotation>
            <documentation>Namespace for Atmospheric products EarthObservationProduct.</documentation>
        </annotation>
    </element>
    <complexType name="EarthObservationType">
        <complexContent>
            <extension base="eop:EarthObservationType"/>
        </complexContent>
    </complexType>
    <complexType name="EarthObservationPropertyType">
        <sequence minOccurs="0">
            <element ref="atm:EarthObservation"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="Acquisition" substitutionGroup="eop:Acquisition" type="atm:AcquisitionType">
        <annotation>
            <documentation>Extension of eop:Acquisition, extended to add view angles.</documentation>
        </annotation>
    </element>
    <complexType name="AcquisitionType">
        <complexContent>
            <extension base="eop:AcquisitionType">
                <sequence>
                    <element name="multiViewAngles" type="gml:MeasureOrNilReasonListType">
                        <annotation>
                            <documentation>Acquisition footprint viewing angles, given at the multiExtentOf polygon edges and center on the ground (assuming a polygon with 4 corners at the bottom of the atmosphere), i.e. one space separated angle triplet consisting of SolarZenithAngle, LineOfSightZenithAngle and RelativeAzimuth given in degrees, for the rearward, centre and foreward points on the footprint.</documentation>
                        </annotation>
                    </element>
                    <element name="centreViewAngles" type="gml:MeasureOrNilReasonListType">
                        <annotation>
                            <documentation>Comma separated triplet of acquisition viewing angles given at the centerOf coordiantes on the ground (bottom of atmosphere), SolarZenithAngle, LineOfSightZenithAngle, RelativeAzimuth given in degrees. </documentation>
                        </annotation>
                    </element>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="AcquisitionPropertyType">
        <sequence>
            <element ref="atm:Acquisition"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <element name="DataLayer" substitutionGroup="gml:AbstractObject" type="atm:DataLayerType"/>
    <complexType name="DataLayerType">
        <sequence>
            <element maxOccurs="1" minOccurs="0" name="speciesError" type="gml:MeasureType">
                <annotation>
                    <documentation>Specy contained in data layer</documentation>
                </annotation>
            </element>
            <element maxOccurs="1" minOccurs="0" name="unit" type="string">
                <annotation>
                    <documentation>Unit of species in data layer</documentation>
                </annotation>
            </element>
            <element maxOccurs="1" minOccurs="0" name="verticalRange" type="gml:DirectPositionListType">
                <annotation>
                    <documentation>Top height of datalayer. May be expressed in meters or other units such as pressure.</documentation>
                </annotation>
            </element>
            <element maxOccurs="1" minOccurs="0" name="species" type="string">
                <annotation>
                    <documentation>Specy contained in data layer</documentation>
                </annotation>
            </element>
            <element maxOccurs="1" minOccurs="0" name="algorithmName" type="string">
                <annotation>
                    <documentation>Name of algorithm used to compute datalayer</documentation>
                </annotation>
            </element>
            <element maxOccurs="1" minOccurs="0" name="algorithmVersion" type="string">
                <annotation>
                    <documentation>Version of algorithm used to compute datalayer</documentation>
                </annotation>
            </element>
        </sequence>
    </complexType>
    <complexType name="DataLayerPropertyType">
        <sequence>
            <element ref="atm:DataLayer"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <simpleType name="PercentageCoverQuotationModeValueType">
        <union memberTypes="atm:PercentageCoverQuotationModeValueEnumerationType atm:PercentageCoverQuotationModeValueOtherType"/>
    </simpleType>
    <simpleType name="PercentageCoverQuotationModeValueEnumerationType">
        <restriction base="string">
            <enumeration value="AUTOMATIC">
                <annotation>
                    <documentation>Cloud cover percentage has been calculated automatically</documentation>
                </annotation>
            </enumeration>
            <enumeration value="MANUAL">
                <annotation>
                    <documentation>Cloud cover percentage has been calculated manally</documentation>
                </annotation>
            </enumeration>
        </restriction>
    </simpleType>
    <simpleType name="PercentageCoverQuotationModeValueOtherType">
        <restriction base="string">
            <pattern value="other: \w{2,}"/>
        </restriction>
    </simpleType>
</schema>
