<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2006 U (http://www.altova.com) by Gudmundur Jokulsson (KSAT) -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:sat="http://cweb.ksat.no/cweb/schema/satellite" xmlns:os="http://cweb.ksat.no/cweb/schema/oil" targetNamespace="http://cweb.ksat.no/cweb/schema/oil" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.1.1" id="os">
	<xsd:annotation>
		<xsd:documentation>
		    Copyright (c) 2006 KSAT, All Rights Reserved.
			Satellite based Oil Spill Detection - GML Application schema
		</xsd:documentation>
	</xsd:annotation>
	<!-- ====================================================================== -->
	<!-- GML IMPORT -->
	<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://cweb.ksat.no/cweb/schema/gml/3.1.1/base/feature.xsd"/>
	<xsd:import namespace="http://cweb.ksat.no/cweb/schema/satellite" schemaLocation="http://cweb.ksat.no/cweb/schema/satellite/sat.xsd"/>
	<!-- ================================================================== -->
	<!-- globally defined os: elements (direct from gml or xsd namespace types) -->
	<xsd:element name="oilSpillID" type="xsd:integer" nillable="true">
		<xsd:annotation>
			<xsd:documentation>ID number of the oil-spill (or oil-slick) within the source dataset beeing analyzed (e.g. a spesific satellite imagery product). NB! Although this ID is of type integer, it should be cosidered as a "ID tag", and not be mistaken for a counter, nor should it be used as an index to iterate over multiple oil-slicks within the dataset</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="volume" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Oil-spill volume in liters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="area" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Oil-spill area in square meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="thickness" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Oil-spill thickness in meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="length" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Oil-spill length in meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="width" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Oil-spill width in meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="orientation" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="occuranceTime" type="xsd:dateTime">
		<xsd:annotation>
			<xsd:documentation>Time of occurance - hint of when the oil-spill (probably) was there</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="slickType" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Textual description of type of oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="confidence" type="os:ConfidenceLevelType">
		<xsd:annotation>
			<xsd:documentation>Grade of confidence in correctness of observation (high, medium, low)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="verified" type="xsd:boolean">
		<xsd:annotation>
			<xsd:documentation>Whether oil-spil is verified (true or false)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="verifiedBy" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Instrument of verification of oil-spill occurance (human, vessel, sensor, etc)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="thicknessVerifiedBy" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Instrument of verification of oil-spill thickness</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="source" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Identification of the source of the oil-spill (e.g. vessel, rig, pipeline, etc)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="possibleSourceName" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Identification of the possible source of the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="possibleSourceType" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Identification of the type of possible source of the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="possibleSourceConfidence" type="os:ConfidenceLevelType">
		<xsd:annotation>
			<xsd:documentation>Grade of confidence in correctness of possible source (high, medium, low)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="possibleSourceLocation" type="gml:PointType">
		<xsd:annotation>
			<xsd:documentation>Location of the possible source of the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="typeCharacteristics" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Textual description of type characteristics for the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="shapeCharacteristics" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Textual description of shape characteristics for the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="contrastCharacteristics" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Textual description of contrast characteristics for the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="edgeCharacteristics" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Textual description of edges characteristics for the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="surroundingCharacteristics" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Textual description of surroundings characteristics for the oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="windDirection" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle, hint of measured local wind direction</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="windSpeed" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Meters pr. second, hint of measured local wind speed</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="waveHeight" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Meters, hint of measured local wave height</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="waveDirection" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle, hint of measured local wave direction</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="wavePeriod" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>seconds, hint of measured local wave period</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="currentDirection" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle, hint of measured local surface current direction</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="currentSpeed" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Meters pr. second, hint of measured local surface current speed</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedWindDirection" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle, assimilated Wind direction</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedWindSpeed" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Meters pr. second, assimilated Wind speed</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedWaveHeight" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Meters, assimilated Wave height</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedWaveDirection" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle, assimilated Wave direction</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedWavePeriod" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>seconds, assimilated Wave period</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedCurrentDirection" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Decimal degrees of an angle, assimilated surface current direction</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="assimilatedCurrentSpeed" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Meters pr. second, assimilated surface current speed</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="country" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Name of country of concern</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="region" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Name of country of consern</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="description" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>A free-text description of the observation.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="dataSource" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Name of organization or system providing this feature collection.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="location" type="gml:PointType">
		<xsd:annotation>
			<xsd:documentation>Aproximate geometric center (e.g. center-of-gravity) of the oil spill polygon</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="cleanSeaConfidence" type="os:CleanSeaConfidenceLevelType">
		<xsd:annotation>
			<xsd:documentation>Grade of confidence in correctness of "clean sea" observation (low, high) - i.e. feature collection with no oil-spills</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="qualityDocumentation" type="xsd:anyURI">
		<xsd:annotation>
			<xsd:documentation>Reference to quality documentation regarding the generation of this oil-spill document</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="possibleSource" type="os:PossibleSourceType"/>
	<xsd:complexType name="PossibleSourceType">
		<xsd:sequence>
			<xsd:element ref="os:possibleSourceName" minOccurs="0"/>
			<xsd:element ref="os:possibleSourceType" minOccurs="0"/>
			<xsd:element ref="os:possibleSourceLocation" minOccurs="0"/>
			<xsd:element ref="os:possibleSourceConfidence" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="ConfidenceLevelType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="high"/>
			<xsd:enumeration value="medium"/>
			<xsd:enumeration value="low"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="CleanSeaConfidenceLevelType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="high"/>
			<xsd:enumeration value="low"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- ================================================================== -->
	<!-- os: detected oil-spill element - based on a gml polygon -->
	<xsd:element name="oilSpill" type="os:OilSpillType" substitutionGroup="gml:polygonProperty">
		<xsd:annotation>
			<xsd:documentation>The snapshot of an oil-spill object, all attributes (except the polygon) are optional. Inherits the polygonMemberType of gml</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="OilSpillType">
		<xsd:complexContent>
			<xsd:extension base="gml:PolygonPropertyType">
				<xsd:sequence>
					<xsd:element ref="os:oilSpillID"/>
					<xsd:element ref="os:volume" minOccurs="0"/>
					<xsd:element ref="os:area" minOccurs="0"/>
					<xsd:element ref="os:thickness" minOccurs="0"/>
					<xsd:element ref="os:length" minOccurs="0"/>
					<xsd:element ref="os:width" minOccurs="0"/>
					<xsd:element ref="os:orientation" minOccurs="0"/>
					<xsd:element ref="os:slickType" minOccurs="0"/>
					<xsd:element ref="os:occuranceTime" minOccurs="0"/>
					<xsd:element ref="os:confidence" minOccurs="0"/>
					<xsd:element ref="os:verified" minOccurs="0"/>
					<xsd:element ref="os:verifiedBy" minOccurs="0"/>
					<xsd:element ref="os:thicknessVerifiedBy" minOccurs="0"/>
					<xsd:element ref="os:source" minOccurs="0"/>
					<xsd:element ref="os:possibleSource" minOccurs="0" maxOccurs="unbounded"/>
					<xsd:element ref="os:typeCharacteristics" minOccurs="0"/>
					<xsd:element ref="os:shapeCharacteristics" minOccurs="0"/>
					<xsd:element ref="os:contrastCharacteristics" minOccurs="0"/>
					<xsd:element ref="os:edgeCharacteristics" minOccurs="0"/>
					<xsd:element ref="os:surroundingCharacteristics" minOccurs="0"/>
					<xsd:element ref="os:windDirection" minOccurs="0"/>
					<xsd:element ref="os:windSpeed" minOccurs="0"/>
					<xsd:element ref="os:waveHeight" minOccurs="0"/>
					<xsd:element ref="os:waveDirection" minOccurs="0"/>
					<xsd:element ref="os:wavePeriod" minOccurs="0"/>
					<xsd:element ref="os:currentDirection" minOccurs="0"/>
					<xsd:element ref="os:currentSpeed" minOccurs="0"/>
					<xsd:element ref="os:assimilatedWindDirection" minOccurs="0"/>
					<xsd:element ref="os:assimilatedWindSpeed" minOccurs="0"/>
					<xsd:element ref="os:assimilatedWaveHeight" minOccurs="0"/>
					<xsd:element ref="os:assimilatedWaveDirection" minOccurs="0"/>
					<xsd:element ref="os:assimilatedWavePeriod" minOccurs="0"/>
					<xsd:element ref="os:assimilatedCurrentDirection" minOccurs="0"/>
					<xsd:element ref="os:assimilatedCurrentSpeed" minOccurs="0"/>
					<xsd:element ref="os:region" minOccurs="0"/>
					<xsd:element ref="os:country" minOccurs="0"/>
					<xsd:element ref="os:location" minOccurs="0"/>
					<xsd:element ref="os:description" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ================================================================== -->
	<!-- OS Feature Type -->
	<xsd:element name="feature" type="os:FeatureType" substitutionGroup="gml:_Feature">
		<xsd:annotation>
			<xsd:documentation>An OS feature encloses a snapshot of a single detected oil-spill</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="FeatureType">
		<xsd:complexContent>
			<xsd:extension base="gml:AbstractFeatureType">
				<xsd:sequence>
					<xsd:element ref="os:oilSpill">
						<xsd:annotation>
							<xsd:documentation>The actual oil-spill status</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="sat:source" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Source (optional)  represents the satellite product of origin, only significant if not present in the feature collection at the higher level</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- =================================================== -->
	<!-- =================================================== -->
	<!-- The Request element for a OS Feature Service, used in KSAT proprietary SOAP service (not standard WFS)   -->
	<!-- =================================================== -->
	<!-- =================================================== -->
	<xsd:element name="getFeature" type="sat:GetFeatureType">
		<xsd:annotation>
			<xsd:documentation>This is the concrete request element used to query a service for OS features</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!-- =================================================== -->
	<!-- =================================================== -->
	<!-- The Response element for a OS Feature Service                        -->
	<!-- =================================================== -->
	<!-- =================================================== -->
	<xsd:element name="featureCollection" type="os:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection">
		<xsd:annotation>
			<xsd:documentation>This is the concrete response element for query a service for os features</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!-- OS  Feature Collection Type -->
	<xsd:complexType name="FeatureCollectionType">
		<xsd:annotation>
			<xsd:documentation>
				An OS feature collection encloses a set of OS features.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="gml:AbstractFeatureCollectionType">
				<xsd:sequence>
					<xsd:element ref="sat:requestID" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>If an requestID was given by the requesting part, it's value shall be set here</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="os:cleanSeaConfidence" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Grade of confidence in correctness of "clean sea" observation (low, high) - i.e. feature collection with no oil-spills</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="os:qualityDocumentation" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Reference to quality documentation regarding the generation of this oil-spill document</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<!-- optional collection common elements -->
					<xsd:element ref="sat:source" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Source (optional)  represents the satellite product of origin</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="os:description" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>A free-text description of the observation.</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="os:dataSource" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>DataSource (optional)  represents here the generating organizational source for this feature collection, e.g. name of the providing organization</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
</xsd:schema>

