<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://geonetwork-opensource.org/schemas/schema-ident"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://geonetwork-opensource.org/schemas/schema-ident http://geonetwork-opensource.org/schemas/schema-ident/schema-ident.xsd">
  <name>iso19115-3.2018</name>
  <id>93f66207-621a-4610-813f-38494a51d121</id>
  <version>1.0</version>
  <appMinorVersionSupported>4.4.0</appMinorVersionSupported>
  <title xml:lang="en">Geographic information &#45;&#45; Metadata</title>
  <title xml:lang="fr">Information géographique &#45;&#45; Métadonnées</title>
  <description xml:lang="en"><![CDATA[
The objective of ISO 19115 is to provide a model for describing information or resources
that can have geographic extents. This part of ISO 19115 is intended to be used by information system
analysts, program planners, and developers of information systems, as well as others in order to define
basic principles and requirements for standardized description of information resources. This part of
ISO  19115 defines metadata elements, their properties, and the relationships between elements, and
establishes a common set of metadata terminology, definitions, and extension procedures.

Although the primary purpose of this part of ISO  19115 is to describe digital information that has a
geographic extent, it can be used to describe all types of resources including textual documents,
initiatives, software, sensors, non-geographic information, product specifications and repositories, i.e. it can be
used to describe information resources that do not have geographic extent. Some domains have their
own metadata standards, such as the Dublin Core for libraries. If necessary such standards and this part
of ISO 19115 could be profiled to create a Community Schema.

This schema also includes:

- Describe imagery data (covered by ISO19115-2)

- Embed data model (feature catalogue) in the dataset record (covered by ISO19110)

- Data quality described using ISO19157



More information:

- `Using the latest ISO Standard for Geographic Information (ISO19115-1) for an INSPIRE Discovery Service <http://cnig.gouv.fr/wp-content/uploads/2015/06/titellus_fx_prunayre_iso19115-3_inspire2015.pdf>`_


This standard is maintained on https://github.com/metadata101/iso19115-3.2018
and is available by default in GeoNetwork 3.8+. The TC211 is maintaining the XSD for this standard on https://github.com/ISO-TC211/XML.


Example of catalogues using this standard:

- `Metawal - Catalogue pour l'information géographique de Wallonie <http://metawal.wallonie.be/>`_ is using ISO19115-3 as the default standard for all records. Main advantages are: categorizations of related documents (eg. online sources, DQ reports, GIS styles, Data models),  better description of organization / parties and roles, remain compliant to the INSPIRE directive by converting to ISO19139 through CSW.

.. figure:: img/metawal-tramedesaxes.png


- `Sextant - Checkpoints <https://sextant.ifremer.fr/>`_ is using ISO19115-3 for data quality description of Specification / Products and upstream data.

.. figure:: img/sextant-checkpoint.png


  ]]></description>
  <description xml:lang="fr"><![CDATA[
L’objectif de l’ISO 19115 est de fournir un modèle destiné à décrire des informations
ou des ressources pouvant avoir des étendues géographiques. Cette partie de l’ISO 19115 est destinée à être utilisée, entre autres, par des analystes de systèmes d’informations, des planificateurs de programmes et des développeurs de systèmes d’informations, dans le but de définir des principes de base et des exigences permettant d’établir une description normalisée des ressources d’informations.

Cette partie de l’ISO 19115 définit les éléments de métadonnées, leurs propriétés et les relations entre les éléments et établit un ensemble commun de terminologies, de définitions et de procédures d’extension concernant les métadonnées.
﻿
Bien que cette partie de l’ISO 19115 ait pour but principal de décrire les informations numériques qui ont une étendue géographique, elle peut être utilisée pour décrire tous les types de ressources, y compris les documents textuels, les initiatives, les logiciels, les informations non géographiques, les spécifications de produit et les entrepôts de données, c’est-à-dire qu’elle peut même être utilisée pour décrire des ressources d’informations n’ayant aucune étendue géographique. Certains domaines ont leurs propres normes de métadonnées, telles que celles du Dublin Core pour les bibliothèques. Si besoin, des profils
de telles normes et de cette partie de l’ISO 19115 pourraient être développés pour créer un Schéma Communautaire.


Ce schéma est également composé des normes :

- ISO19110 pour les modèles de données

- ISO19115-2 pour l'imagerie

- ISO19157 pour la qualité des données
  ]]></description>
  <standardUrl xml:lang="en">http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=32579</standardUrl>
  <standardUrl xml:lang="fr">http://www.iso.org/iso/fr/home/store/catalogue_tc/catalogue_detail.htm?csnumber=32579</standardUrl>
  <!-- FIXME: add all required schemas -->
  <schemaLocation>http://standards.iso.org/iso/19115/-3/mdb/2.0 https://schemas.isotc211.org/19115/-3/mdb/2.0/mdb.xsd</schemaLocation>
  <autodetect xmlns:cit="http://standards.iso.org/iso/19115/-3/cit/2.0"
              xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0"
              xmlns:mco="http://standards.iso.org/iso/19115/-3/mco/1.0"
              xmlns:mdb="http://standards.iso.org/iso/19115/-3/mdb/2.0"
              xmlns:mrs="http://standards.iso.org/iso/19115/-3/mrs/1.0"
              xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
              xmlns:mdq="http://standards.iso.org/iso/19157/-2/mdq/1.0"
              xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0">
    <!-- ISO19115-3 identification is based on the
    root element of the record. It could be a MD_Metadata
    element (for a metadata recocrd) or some other eleement
    when used as a subtemplate (cf. directory support).
    -->
    <elements type="root">
      <mdb:MD_Metadata/>
      <cit:CI_Responsibility/>
      <cit:CI_Organisation/>
      <mcc:MD_BrowseGraphic/>
      <mrs:MD_ReferenceSystem/>
      <mrd:MD_Format/>
      <mdq:DQ_DomainConsistency/>
      <mdq:DQ_CompletenessCommission/>
      <mdq:DQ_CompletenessOmission/>
      <mdq:DQ_ConceptualConsistency/>
      <mdq:DQ_FormatConsistency/>
      <mdq:DQ_AbsoluteExternalPositionalAccuracy/>
      <mdq:DQ_AccuracyOfATimeMeasurement/>
      <mdq:DQ_Confidence/>
      <mdq:DQ_GriddedDataPositionalAccuracy/>
      <mdq:DQ_Homogeneity/>
      <mdq:DQ_NonQuantitativeAttributeCorrectness/>
      <mdq:DQ_QuantitativeAttributeAccuracy/>
      <mdq:DQ_RelativeInternalPositionalAccuracy/>
      <mdq:DQ_Representativity/>
      <mdq:DQ_TemporalConsistency/>
      <mdq:DQ_TemporalValidity/>
      <mdq:DQ_ThematicClassificationCorrectness/>
      <mdq:DQ_TopologicalConsistency/>
      <mdq:DQ_UsabilityElement/>
      <mco:MD_Constraints/>
      <mco:MD_LegalConstraints/>
      <mco:MD_SecurityConstraints/>
      <!-- TODO: Add subtemplate roots -->
    </elements>
  </autodetect>
  <!--
  Filters defined which elements should be removed
  depending on user privileges.
  -->
  <filters xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0">
    <!--
    All elements having a nilReason attribute
    set to withheld, then users needs to have
    the edit privilege in order to be able to see
    the information. When filtered the element is
    preserved but with no content in.
    -->
    <filter xpath=".//*[@gco:nilReason = 'withheld']"
            jsonpath="$.*[?(@.nilReason == 'withheld')]"
            ifNotOperation="editing">
      <keepMarkedElement gco:nilReason="withheld"/>
    </filter>

    <!--
    All online source having the following protocols
    are filtered when user does not have download
    privilege.
    -->
    <filter xpath=".//mrd:onLine[contains(*/cit:protocol/gco:CharacterString, 'DOWNLOAD') or
                                  */cit:protocol/gco:CharacterString = 'FILE' or
                                  */cit:protocol/gco:CharacterString = 'DB' or
                                  */cit:protocol/gco:CharacterString = 'COPYFILE']"
            jsonpath="$['link'][?(@.protocol =~ /(DOWNLOAD|FILE|DB|COPYFILE).*?/i)]"
            ifNotOperation="download"/>

    <!--
    All online source having WMS protocol are filtered
    to user not having dynamic privilege.
    TODO: other type of services ?
    -->
    <filter xpath=".//mrd:onLine[starts-with(*/cit:protocol/gco:CharacterString, 'OGC:WMS')]"
            jsonpath="$['link'][?(@.protocol =~ /OGC:WMS.*?/i)]"
            ifNotOperation="dynamic"/>
  </filters>
</schema>
