﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema 
	xmlns:gml="http://www.opengis.net/gml/3.2" 
	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
	xmlns:fd="http://dd.eionet.europa.eu/schemas/Floods/CFDGML" 
	xmlns="http://dd.eionet.europa.eu/schemas/Floods/FDGML" 
	elementFormDefault="qualified" 
	targetNamespace="http://dd.eionet.europa.eu/schemas/Floods/FDGML">
<xs:import namespace="http://dd.eionet.europa.eu/schemas/Floods/CFDGML" 
	schemaLocation="http://dd.eionet.europa.eu/schemas/Floods/GML_FDcommon.xsd"/>
	<xs:complexType name="Metadata">
		<xs:annotation>
			<xs:documentation>INSPIRE relevant metadata to be filled in:

- Resource title.
- Point of contact.
- Spatial coverage.
- Spatial resolution.
- Temporal reference.
- Map language.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="pointOfContact" type="fd:PointOfContact" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Contact information to be filled in:

- Responsible organisation.
- email.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="resourceTitle" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Map/service title.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="spatialCoverage" type="xs:string" minOccurs="1" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Spatial coverage refers to the geographical area that is presented on the map.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="spatialResolution" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Spatial resolution must be specified by usig the resolution value and the unit of measure. 
Based on the type of reported map the resolution refers to the following:
- Map image: size of the pixel used to construct the image (eg. 100 m)
- Vector map: scale used to represent the map (eg. 1:25 000 )</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="temporalReference" type="fd:TemporalReference" minOccurs="1" maxOccurs="4">
				<xs:annotation>
					<xs:documentation>Information about the temporal extent of the map.

- Map date of creation.
- Map temporal extent.
- Map date of publication.
- Map date of last revision.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="mapLanguage" type="xs:string" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Language of the map.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="otherMapLinks" type="fd:CharacterString" minOccurs="1" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Report other relevant links where information about the FHRM map is available.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ServiceURL">
		<xs:annotation>
			<xs:documentation>ULR to connect the service with the Flood Hazard Risk Map.
At least 1 URL service must be provided.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="wfs" type="fd:URL" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>URL to the Web Feature Service</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="wms" type="fd:URL" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>URL to the Web Map Service</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="portal" type="fd:URL" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>URL to a Portal where the service is available.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="pdf" type="fd:URL" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>URL to the pdf file</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="other" type="fd:URL" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>URL to another kind of service</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Metadata" type="Metadata" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ManagementAreaIdentifier">
		<xs:annotation>
			<xs:documentation>Unique identifier code for units of management.</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element name="subUnitIdentifier" type="fd:FeatureUniqueEUCodeType" minOccurs="1" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Use relevant SubUnitcode reported under the Reporting obligation for Unit of management and competent authorities.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="uomIdentifier" type="fd:FeatureUniqueEUCodeType" minOccurs="1" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Use relevant UOMcode reported under the Reporting obligation for Unit of management and competent authorities</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="RelevantFloodAreaIdentifier">
		<xs:annotation>
			<xs:documentation>Unique identifier code for relevant areas of flood risk.</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element name="apsfrIdentifier" type="fd:FeatureUniqueEUCodeType" minOccurs="1" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Unique EU code for the area of potential significant flood risk as reported under the Reporting obligation for Preliminary flood risk assessment.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="boundingBox" type="fd:CharacterString" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>In cases where the MS has not used either UoM, SubUnits or APSFR the MS needs to report a 'bounding box' where they have available national FHRM and report the link at this level. </xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="FloodHazardRiskMaps">
		<xs:annotation>
			<xs:documentation>
						Used to establish and maintain links to national FHRM</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="FloodHazardRiskMap" type="FloodHazardRiskMap" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="FloodHazardRiskMaps" type="FloodHazardRiskMaps">
		<xs:annotation>
			<xs:documentation>
				Used to establish and maintain links to national FHRM</xs:documentation>
		</xs:annotation>
	</xs:element>	
	<xs:complexType name="MapInformation">
		<xs:annotation>
			<xs:documentation>Relevant information about the Flood Hazard Risk map:

- Map description.
- Map category.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="description" type="fd:CharacterString" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Give short description of the map content - eg. flood scenarios, exposed elements...</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="category" type="fd:MapCategoryCodelist" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>The map category that the URL is displaying. Choose between the 6 overall categories or specify other value:
- LowProbabilityHazard
- MediumProbabilityHazard
- HighProbabilityHazard
- LowProbabilityRisk
- MediumProbabilityRisk
- HighProbabilityRisk
- Other</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="FloodHazardRiskMap">
		<xs:sequence>
			<xs:element name="MapInformation" type="MapInformation" minOccurs="1" maxOccurs="1"/>
			<xs:element name="RelevantFloodAreaIdentifier" type="RelevantFloodAreaIdentifier" minOccurs="1" maxOccurs="1"/>
			<xs:element name="ManagementAreaIdentifier" type="ManagementAreaIdentifier" minOccurs="1" maxOccurs="1"/>
			<xs:element name="ServiceURL" type="ServiceURL" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>

	
</xs:schema>
