<?xml version="1.0" encoding="UTF-8"?>
<schema 
	targetNamespace="http://www.opengis.net/gml/3.2" 
	xmlns:gml="http://www.opengis.net/gml/3.2" 
	xmlns="http://www.w3.org/2001/XMLSchema" 
	elementFormDefault="qualified" version="3.2.1 2010-01-28">
	
	<element name="boundedBy" type="gml:BoundingShapeType">
    <annotation>
      <documentation>This property describes the minimum bounding box or rectangle that encloses the entire feature.</documentation>
    </annotation>
  </element>

	<complexType name="BoundingShapeType">
    <sequence>
      <choice>
        <element ref="gml:Envelope"/>
        <element ref="gml:Null"/>
      </choice>
    </sequence>
    <attribute name="nilReason" type="gml:NilReasonType"/>
  </complexType>

	 <complexType name="EnvelopeType">
    <choice>
      <sequence>
        <element name="lowerCorner" type="gml:DirectPositionType"/>
        <element name="upperCorner" type="gml:DirectPositionType"/>
      </sequence>
      <element ref="gml:pos" minOccurs="2" maxOccurs="2">
        <annotation>
          <appinfo>deprecated</appinfo>
        </annotation>
      </element>
      <element ref="gml:coordinates"/>
    </choice>
    <attributeGroup ref="gml:SRSReferenceGroup"/>
  </complexType>
  <element name="Envelope" type="gml:EnvelopeType" substitutionGroup="gml:AbstractObject">
    <annotation>
      <documentation>Envelope defines an extent using a pair of positions
defining opposite corners in arbitrary dimensions. The first direct position is
the "lower corner" (a coordinate position consisting of all the minimal
ordinates for each dimension for all points within the envelope), the second one
the "upper corner" (a coordinate position consisting of all the maximal
ordinates for each dimension for all points within the envelope).
The use of the properties "coordinates" and "pos" has been deprecated. The
explicitly named properties "lowerCorner" and "upperCorner" shall be used
instead.</documentation>
    </annotation>
  </element>

	<element name="AbstractObject" abstract="true">
    <annotation>
      <documentation>This element has no type defined, and is therefore
implicitly (according to the rules of W3C XML Schema) an XML Schema anyType. It
is used as the head of an XML Schema substitution group which unifies complex
content and certain simple content elements used for datatypes in GML, including
the gml:AbstractGML substitution group.</documentation>
    </annotation>
  </element>

	 <element name="Null" type="gml:NilReasonType">
    <annotation>
      <appinfo>deprecated</appinfo>
    </annotation>
  </element>

	<simpleType name="NilReasonType">
    <annotation>
      <documentation>gml:NilReasonType defines a content model that allows
recording of an explanation for a void value or other exception.
gml:NilReasonType is a union of the following enumerated values:
- inapplicable there is no value
- missing the correct value is not readily available to the sender of this data.
  Furthermore, a correct value may not exist
- template the value will be available later
- unknown the correct value is not known to, and not computable by, the sender
  of this data. However, a correct value probably exists
- withheld the value is not divulged
- other:text other brief explanation, where text is a string of two or more
  characters with no included spaces
and
- anyURI which should refer to a resource which describes the reason for the
  exception
A particular community may choose to assign more detailed semantics to the
standard values provided. Alternatively, the URI method enables a specific or
more complete explanation for the absence of a value to be provided elsewhere
and indicated by-reference in an instance document.
gml:NilReasonType is used as a member of a union in a number of simple content
types where it is necessary to permit a value from the NilReasonType union as an
alternative to the primary type.</documentation>
    </annotation>
    <union memberTypes="gml:NilReasonEnumeration anyURI"/>
  </simpleType>

	 <complexType name="DirectPositionType">
    <annotation>
      <documentation>Direct position instances hold the coordinates for a
position within some coordinate reference system (CRS). Since direct positions,
as data types, will often be included in larger objects (such as geometry
elements) that have references to CRS, the srsName attribute will in general be
missing, if this particular direct position is included in a larger element with
such a reference to a CRS. In this case, the CRS is implicitly assumed to take
on the value of the containing object's CRS.
if no srsName attribute is given, the CRS shall be specified as part of the
larger context this geometry element is part of, typically a geometric object
like a point, curve, etc.</documentation>
    </annotation>
    <simpleContent>
      <extension base="gml:doubleList">
        <attributeGroup ref="gml:SRSReferenceGroup"/>
      </extension>
    </simpleContent>
  </complexType>
  <element name="pos" type="gml:DirectPositionType"/>
  <complexType name="DirectPositionListType">
    <annotation>
      <documentation>posList instances (and other instances with the content
model specified by DirectPositionListType) hold the coordinates for a sequence
of direct positions within the same coordinate reference system (CRS).
if no srsName attribute is given, the CRS shall be specified as part of the
larger context this geometry element is part of, typically a geometric object
like a point, curve, etc.
The optional attribute count specifies the number of direct positions in the
list. If the attribute count is present then the attribute srsDimension shall be
present, too.
The number of entries in the list is equal to the product of the dimensionality
of the coordinate reference system (i.e. it is a derived value of the coordinate
reference system definition) and the number of direct positions.</documentation>
    </annotation>
    <simpleContent>
      <extension base="gml:doubleList">
        <attributeGroup ref="gml:SRSReferenceGroup"/>
        <attribute name="count" type="positiveInteger"/>
      </extension>
    </simpleContent>
  </complexType>

	<simpleType name="doubleList">
    <annotation>
      <documentation>A type for a list of values of the respective simple
type.</documentation>
    </annotation>
    <list itemType="double"/>
  </simpleType>

	<attributeGroup name="SRSReferenceGroup">
    <annotation>
      <documentation>The attribute group SRSReferenceGroup is an optional
reference to the CRS used by this geometry, with optional additional information
to simplify the processing of the coordinates when a more complete definition of
the CRS is not needed.
In general the attribute srsName points to a CRS instance of
gml:AbstractCoordinateReferenceSystem. For well-known references it is not
required that the CRS description exists at the location the URI points to.
If no srsName attribute is given, the CRS shall be specified as part of the
larger context this geometry element is part of.</documentation>
    </annotation>
    <attribute name="srsName" type="anyURI"/>
    <attribute name="srsDimension" type="positiveInteger"/>
    <attributeGroup ref="gml:SRSInformationGroup"/>
  </attributeGroup>
  <attributeGroup name="SRSInformationGroup">
    <annotation>
      <documentation>The attributes uomLabels and axisLabels, defined in the
SRSInformationGroup attribute group, are optional additional and redundant
information for a CRS to simplify the processing of the coordinate values when a
more complete definition of the CRS is not needed. This information shall be the
same as included in the complete definition of the CRS, referenced by the
srsName attribute. When the srsName attribute is included, either both or
neither of the axisLabels and uomLabels attributes shall be included. When the
srsName attribute is omitted, both of these attributes shall be omitted.
The attribute axisLabels is an ordered list of labels for all the axes of this
CRS. The gml:axisAbbrev value should be used for these axis labels, after spaces
and forbidden characters are removed. When the srsName attribute is included,
this attribute is optional. When the srsName attribute is omitted, this
attribute shall also be omitted.
The attribute uomLabels is an ordered list of unit of measure (uom) labels for
all the axes of this CRS. The value of the string in the gml:catalogSymbol
should be used for this uom labels, after spaces and forbidden characters are
removed. When the axisLabels attribute is included, this attribute shall also be
included. When the axisLabels attribute is omitted, this attribute shall also be
omitted.</documentation>
    </annotation>
    <attribute name="axisLabels" type="gml:NCNameList"/>
    <attribute name="uomLabels" type="gml:NCNameList"/>
  </attributeGroup>

	<simpleType name="NCNameList">
    <annotation>
      <documentation>A type for a list of values of the respective simple
type.</documentation>
    </annotation>
    <list itemType="NCName"/>
  </simpleType>

	 <element name="coordinates" type="gml:CoordinatesType">
    <annotation>
      <appinfo>deprecated</appinfo>
    </annotation>
  </element>

	<complexType name="CoordinatesType">
    <annotation>
      <documentation>This type is deprecated for tuples with ordinate values
that are numbers.
CoordinatesType is a text string, intended to be used to record an array of
tuples or coordinates.
While it is not possible to enforce the internal structure of the string through
schema validation, some optional attributes have been provided in previous
versions of GML to support a description of the internal structure. These
attributes are deprecated. The attributes were intended to be used as follows:
Decimal symbol used for a decimal point (default="." a stop or period)
cs          symbol used to separate components within a tuple or coordinate
string (default="," a comma)
ts          symbol used to separate tuples or coordinate strings (default=" " a
space)
Since it is based on the XML Schema string type, CoordinatesType may be used in
the construction of tables of tuples or arrays of tuples, including ones that
contain mixed text and numeric values.</documentation>
    </annotation>
    <simpleContent>
      <extension base="string">
        <attribute name="decimal" type="string" default="."/>
        <attribute name="cs" type="string" default=","/>
        <attribute name="ts" type="string" default="&#x20;"/>
      </extension>
    </simpleContent>
  </complexType>

   <simpleType name="NilReasonEnumeration">
    <union>
      <simpleType>
        <restriction base="string">
          <enumeration value="inapplicable"/>
          <enumeration value="missing"/>
          <enumeration value="template"/>
          <enumeration value="unknown"/>
          <enumeration value="withheld"/>
        </restriction>
      </simpleType>
      <simpleType>
        <restriction base="string">
          <pattern value="other:\w{2,}"/>
        </restriction>
      </simpleType>
    </union>
  </simpleType>
  
</schema>
