<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opengis.net/gml" elementFormDefault="qualified" version="3.0.0" xml:lang="en" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
    <annotation>
        <appinfo source="urn:opengis:specification:gml:schema-measures:v3.0.0"/>
        <documentation>
            <name>measures.xsd</name>
            <version>3.0</version>
            <scope>How to encode measures, each with associated unit of measure (uom).</scope>
            <description>Extends the units.xsd and basicTypes.xsd schemas with types for recording measures using specific types of units, especially the measures and units needed for coordinate reference systems and coordinate operations. The specific unit types encoded are length, angle, scale factor, time, area, volume, velocity, and grid length. This schema allows angle values to be recorded as single numbers or in degree-minute-second format. GML 3.0 candidate schema, primary editor: Arliss Whiteside. Last updated 2002/11/13.</description>
            <copyright>Copyright (c) 2001-2002 OpenGIS, All Rights Reserved</copyright>
            <conformance>Parts of this schema are based on Subclause 6.5.7 of ISO/CD 19103 Geographic information - Conceptual schema language, on Subclause A.5.2.2.3 of ISO/CD 19118 Geographic information - Encoding, and on Subclause 4.7 of OpenGIS Recommendation Paper OGC 02-007r4 Units of Measure Use and Definition Recommendations.</conformance>
        </documentation>
    </annotation>
    <include schemaLocation="units.xsd"/>
    <element name="measure" type="gml:MeasureType" nillable="false" abstract="false"/>
    <complexType name="LengthType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a length (or distance) quantity, with its units. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for a length, such as metres or feet.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="ScaleType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a scale factor (or ratio) that has no physical unit. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for a scale factor, such as percent, permil, or parts-per-million.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="TimeType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a time or temporal quantity, with its units. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for a time value, such as seconds or weeks.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="GridLengthType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a length (or distance) quantity in a grid, where the grid spacing does not have any associated physical units, or does not have a constant physical spacing. This grid length will often be used in a digital image grid, where the base units are likely to be pixel spacings. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for length along the axes of a grid, such as pixel spacings or grid spacings.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="AreaType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a spatial area quantity, with its units. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for an area, such as square metres or square miles.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="VolumeType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a spatial volume quantity, with its units. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for a volume, such as cubic metres or cubic feet.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="VelocityType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of a velocity, with its units. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for a velocity, such as metres per second or miles per hour.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <complexType name="AngleChoiceType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of an angle quantity provided in either degree-minute-second format or single value format.</documentation>
        </annotation>
        <choice minOccurs="1" maxOccurs="1">
            <element ref="gml:angle" minOccurs="1" maxOccurs="1" nillable="false"/>
            <element ref="gml:dmsAngle" minOccurs="1" maxOccurs="1" nillable="false"/>
        </choice>
    </complexType>
    <element name="angle" type="gml:AngleType" nillable="false" abstract="false"/>
    <complexType name="AngleType" mixed="false" abstract="false">
        <annotation>
            <documentation>Value of an angle quantity recorded as a single number, with its units. Uses the MeasureType with the restriction that the unit of measure referenced by uom must be suitable for an angle, such as degrees or radians.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:MeasureType"/>
        </simpleContent>
    </complexType>
    <element name="dmsAngle" type="gml:DMSAngleType" nillable="false" abstract="false"/>
    <complexType name="DMSAngleType" mixed="false" abstract="false">
        <annotation>
            <documentation>Angle value provided in degree-minute-second or degree-minute format.</documentation>
        </annotation>
        <sequence minOccurs="1" maxOccurs="1">
            <element ref="gml:degrees" minOccurs="1" maxOccurs="1" nillable="false"/>
            <choice minOccurs="0" maxOccurs="1">
                <element ref="gml:decimalMinutes" minOccurs="1" maxOccurs="1" nillable="false"/>
                <sequence minOccurs="1" maxOccurs="1">
                    <element ref="gml:minutes" minOccurs="1" maxOccurs="1" nillable="false"/>
                    <element ref="gml:seconds" minOccurs="0" maxOccurs="1" nillable="false"/>
                </sequence>
            </choice>
        </sequence>
    </complexType>
    <element name="degrees" type="gml:DegreesType" nillable="false" abstract="false"/>
    <complexType name="DegreesType" mixed="false" abstract="false">
        <annotation>
            <documentation>Integer number of degrees, plus the angle direction. This element can be used for geographic Latitude and Longitude. For Latitude, the XML attribute direction can take the values "N" or "S", meaning North or South of the equator. For Longitude, direction can take the values "E" or "W", meaning East or West of the prime meridian. This element can also be used for other angles. In that case, the direction can take the values "+" or "-" (of SignType), in the specified rotational direction from a specified reference direction.</documentation>
        </annotation>
        <simpleContent>
            <extension base="gml:DegreeValueType">
                <attribute name="direction" use="optional">
                    <simpleType>
                        <union>
                            <simpleType>
                                <restriction base="string">
                                    <enumeration value="N"/>
                                    <enumeration value="E"/>
                                    <enumeration value="S"/>
                                    <enumeration value="W"/>
                                </restriction>
                            </simpleType>
                            <simpleType>
                                <restriction base="gml:SignType"/>
                            </simpleType>
                        </union>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>
    <simpleType name="DegreeValueType">
        <annotation>
            <documentation>Integer number of degrees in a degree-minute-second or degree-minute angular value, without indication of direction.</documentation>
        </annotation>
        <restriction base="nonNegativeInteger">
            <maxInclusive value="359" fixed="false"/>
        </restriction>
    </simpleType>
    <element name="decimalMinutes" type="gml:DecimalMinutesType" nillable="false" abstract="false"/>
    <simpleType name="DecimalMinutesType">
        <annotation>
            <documentation>Decimal number of arc-minutes in a degree-minute angular value.</documentation>
        </annotation>
        <restriction base="decimal">
            <minInclusive value="0.00" fixed="false"/>
            <maxExclusive value="60.00" fixed="false"/>
        </restriction>
    </simpleType>
    <element name="minutes" type="gml:ArcMinutesType" nillable="false" abstract="false"/>
    <simpleType name="ArcMinutesType">
        <annotation>
            <documentation>Integer number of arc-minutes in a degree-minute-second angular value.</documentation>
        </annotation>
        <restriction base="nonNegativeInteger">
            <maxInclusive value="59" fixed="false"/>
        </restriction>
    </simpleType>
    <element name="seconds" type="gml:ArcSecondsType" nillable="false" abstract="false"/>
    <simpleType name="ArcSecondsType">
        <annotation>
            <documentation>Number of arc-seconds in a degree-minute-second angular value.</documentation>
        </annotation>
        <restriction base="decimal">
            <minInclusive value="0.00" fixed="false"/>
            <maxExclusive value="60.00" fixed="false"/>
        </restriction>
    </simpleType>
</schema>