Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mapping to dcat:Distribution #57

Open
streino opened this issue Sep 19, 2024 · 2 comments
Open

Improve mapping to dcat:Distribution #57

streino opened this issue Sep 19, 2024 · 2 comments
Labels
feedback-requested Community feedback requested

Comments

@streino
Copy link
Contributor

streino commented Sep 19, 2024

Currently the XSLT maps resources to dcat:Distribution iif gmd:URL contains "?request=getcapabilities" or CI_OnLineFunctionCode is one of "download", "offlineAccess", "order".

The INSPIRE Technical Guidance defines other cases we believe should be mapped to dcat:Distribution. The summary below is our interpretation.

If this is of interest and we can reach a common interpretation, we would be willing to contribute a PR.

Resource pointing to a service (the description of a service)

Conditions

INSPIRE Technical Guidance

section 3.3 :

The class described in this section requires that the Resource Locator element points to the set of additional information about a service resource (i.e. "Get Download/View Service Metadata" operation).
Additionally, the class described in this section requires the presence of gmd:protocol and gmd:applicationProfile, paired with the defined codelist values from the INSPIRE Registry. This would imply fulfilling this portion of the simplification described here.

TG 8.1

TG 8.2

Resource pointing to the data of a service

Conditions

Same as above except gmd:applicationProfile.

INSPIRE Technical Guidance

section 3.3 :

The presence of additional Resource Locator elements, pointing to the data set itself (e.g. "Get Spatial Data Set" request of a Download Service), is allowed, due to the multiplicity expressed by TG Requirement 1.8. Consequently, these additional Resource Locator elements should avoid at least the use of the gmd:applicationProfile element specified below, in order to reduce the complexity of a machine-to-machine element recognition made by an INSPIRE software implementation such as the INSPIRE Geoportal.

@jakubklimek jakubklimek added the feedback-requested Community feedback requested label Oct 8, 2024
@jakubklimek
Copy link
Collaborator

@streino Could you elaborate, preferrably using examples, what would the distributions look like? Do you suggest creating a "downloadable file" distribution for "Resource pointing to the data of a service" and a data service distribution for "Resource pointing to a service (the description of a service)"?

In addition, the "view" applicationProfile seems like a human UI, not a machine accessible data / service distribution, so maybe it would be better suited for a landing page (dcat:landingPage) or documentation (foaf:page)?

@mjanez
Copy link
Contributor

mjanez commented Dec 3, 2024

@jakubklimek & @streino Thank you both for your valuable contributions!

We need to properly serialize distributions using the function="information" attribute in our metadata. Below are examples of our current metadata and the desired Turtle output.

Example Metadata

<gmd:distributionInfo>
   <gmd:MD_Distribution>
       <gmd:distributionFormat>
           <gmd:MD_Format>
               <gmd:name>
                   <gco:CharacterString>application/gml+xml</gco:CharacterString>
               </gmd:name>
               <gmd:version>
                   <gco:CharacterString>3.0</gco:CharacterString>
               </gmd:version>
               <gmd:specification>
                   <gco:CharacterString>D2.8.II.2 INSPIRE Data Specification on Land Cover – Technical Guidelines</gco:CharacterString>
               </gmd:specification>
           </gmd:MD_Format>
       </gmd:distributionFormat>
       <gmd:transferOptions>
           <gmd:MD_DigitalTransferOptions>
               <gmd:onLine>
                   <gmd:CI_OnlineResource>
                       <gmd:linkage>
                           <gmd:URL>https://wmts.mapama.gob.es/sig/lulucf2000/LC.LandCoverRaster/wms</gmd:URL>
                       </gmd:linkage>
                       <gmd:protocol>
                           <gco:CharacterString>OGC:WMS-1.1.1-http-get-map</gco:CharacterString>
                       </gmd:protocol>
                       <gmd:name>
                           <gco:CharacterString>LC.LandCoverRaster</gco:CharacterString>
                       </gmd:name>
                       <gmd:description>
                           <gco:CharacterString>Mapa LULUCF. Año 2000</gco:CharacterString>
                       </gmd:description>
                   </gmd:CI_OnlineResource>
               </gmd:onLine>
               <gmd:onLine>
                   <gmd:CI_OnlineResource>
                       <gmd:linkage>
                           <gmd:URL>https://wmts.mapama.gob.es/sig/lulucf2000/LC.LandCoverRaster/wms?request=getcapabilities&service=wms</gmd:URL>
                       </gmd:linkage>
                       <gmd:protocol>
                           <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
                       </gmd:protocol>
                       <gmd:name>
                           <gco:CharacterString>Descripción del Servicio de Mapa LULUCF. Año 2000</gco:CharacterString>
                       </gmd:name>
                       <gmd:description>
                           <gco:CharacterString>GetCapabilities</gco:CharacterString>
                       </gmd:description>
                       <gmd:function>
                           <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information"/>
                       </gmd:function>
                   </gmd:CI_OnlineResource>
               </gmd:onLine>
               <gmd:onLine>
                   <gmd:CI_OnlineResource>
                       <gmd:linkage>
                           <gmd:URL>https://www.mapama.gob.es/ide/inspire/atom/downloadservice.xml</gmd:URL>
                       </gmd:linkage>
                       <gmd:protocol>
                           <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
                       </gmd:protocol>
                       <gmd:name>
                           <gco:CharacterString>Enlace de descarga del servicio ATOM</gco:CharacterString>
                       </gmd:name>
                   </gmd:CI_OnlineResource>
               </gmd:onLine>
               <gmd:onLine>
                   <gmd:CI_OnlineResource>
                       <gmd:linkage>
                           <gmd:URL>https://www.mapama.gob.es/ide/inspire/atom/CategCalidadEvalAmbiental/downloadservice.xml</gmd:URL>
                       </gmd:linkage>
                       <gmd:protocol>
                           <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
                       </gmd:protocol>
                       <gmd:name>
                           <gco:CharacterString>Enlace de descarga del servicio ATOM Categoría Calidad y evaluación ambiental</gco:CharacterString>
                       </gmd:name>
                   </gmd:CI_OnlineResource>
               </gmd:onLine>
               <gmd:onLine>
                   <gmd:CI_OnlineResource>
                       <gmd:linkage>
                           <gmd:URL>https://sig.mapama.gob.es/geoportal</gmd:URL>
                       </gmd:linkage>
                       <gmd:protocol>
                           <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
                       </gmd:protocol>
                       <gmd:name>
                           <gco:CharacterString>Geoportal del Ministerio</gco:CharacterString>
                       </gmd:name>
                       <gmd:function>
                           <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information"/>
                       </gmd:function>
                   </gmd:CI_OnlineResource>
               </gmd:onLine>
               <gmd:onLine>
                   <gmd:CI_OnlineResource>
                       <gmd:linkage>
                           <gmd:URL>https://www.miteco.gob.es/es/cartografia-y-sig/ide/descargas/calidad-y-evaluacion-ambiental/mapa-lulucf-ccaa.html</gmd:URL>
                       </gmd:linkage>
                       <gmd:protocol>
                           <gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
                       </gmd:protocol>
                       <gmd:name>
                           <gco:CharacterString>Enlace a la página de descargas de la IDE del Ministerio</gco:CharacterString>
                       </gmd:name>
                   </gmd:CI_OnlineResource>
               </gmd:onLine>
           </gmd:MD_DigitalTransferOptions>
       </gmd:transferOptions>
   </gmd:MD_Distribution>
</gmd:distributionInfo>

Desired Turtle Output

@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://wmts.mapama.gob.es/sig/lulucf2000/LC.LandCoverRaster/wms> a dcat:Distribution ;
    dct:title "LC.LandCoverRaster" ;
    dct:description "Mapa LULUCF. Año 2000" ;
    dcat:accessURL <https://wmts.mapama.gob.es/sig/lulucf2000/LC.LandCoverRaster/wms> ;
    dcat:mediaType <http://www.opengis.net/def/serviceType/ogc/wms> ;
    dct:format <http://publications.europa.eu/resource/authority/file-type/WMS_SRVC> ;
    dct:conformsTo <https://inspire.ec.europa.eu/id/document/tg/d2.8.ii.2> ;
    dct:issued "2024-07-01"^^xsd:date ;
    dct:modified "2024-12-03"^^xsd:date ;
    dct:language <http://publications.europa.eu/resource/authority/language/SPA> ;
    dct:rights <http://publications.europa.eu/resource/authority/access-right/PUBLIC> ;
    dct:license <http://creativecommons.org/licenses/by/4.0/> ;
    adms:status <http://purl.org/adms/status/Completed> ;
    dcatap:availability <http://publications.europa.eu/resource/authority/planned-availability/AVAILABLE> ;
    cnt:characterEncoding "UTF-8" .

<https://wmts.mapama.gob.es/sig/lulucf2000/LC.LandCoverRaster/wms?request=getcapabilities&service=wms> a dcat:Distribution ;
    dct:title "Descripción del Servicio de Mapa LULUCF. Año 2000" ;
    dct:description "GetCapabilities" ;
    dcat:accessURL <https://wmts.mapama.gob.es/sig/lulucf2000/LC.LandCoverRaster/wms?request=getcapabilities&service=wms> ;
    dcat:mediaType <http://www.opengis.net/def/serviceType/ogc/wms> ;
    dct:format <http://publications.europa.eu/resource/authority/file-type/WMS_SRVC> ;
    dct:conformsTo <https://inspire.ec.europa.eu/id/document/tg/d2.8.ii.2> ;
    dct:issued "2024-07-01"^^xsd:date ;
    dct:modified "2024-12-03"^^xsd:date ;
    dct:language <http://publications.europa.eu/resource/authority/language/SPA> ;
    dct:rights <http://publications.europa.eu/resource/authority/access-right/PUBLIC> ;
    dct:license <http://creativecommons.org/licenses/by/4.0/> ;
    adms:status <http://purl.org/adms/status/Completed> ;
    dcatap:availability <http://publications.europa.eu/resource/authority/planned-availability/AVAILABLE> ;
    cnt:characterEncoding "UTF-8" .

...

Note

More metadata records from ES INSPIRE Catalogue: idee.es


Proposed Change

To generate the correct dcat:distribution elements, update the XSLT logic to include function="information" in the condition.

Original Condition:

<xsl:when test="$points-to-service = 'yes' or $function = 'download' or $function = 'offlineAccess' or $function = 'order'">

Updated Condition:

<xsl:when test="$points-to-service = 'yes' or $function = 'download' or $function = 'offlineAccess' or $function = 'order' or $function = 'information'">

INSPIRE Technical Guidelines Context

According to INSPIRE Technical Guidelines 4.3.2.1, metadata must:

  1. List all access points from the spatial data service provider.
  2. Include detailed descriptions via gmd:URL, gmd:description, and gmd:function.

The function="information" is explicitly recommended to describe access points.

Example from Guidelines:

<gmd:transferOptions>
  <gmd:MD_DigitalTransferOptions>
    <gmd:online>
      <gmd:CI_OnlineResource>
        <gmd:linkage>
          <gmd:URL>http://example.com/service?wsdl</gmd:URL>
        </gmd:linkage>
        <gmd:description>
          <gmx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/OnLineDescriptionCode/accessPoint">
            accessPoint
          </gmx:Anchor>
        </gmd:description>
        <gmd:function>
          <gmd:CI_OnLineFunctionCode codeList="http://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">
            information
          </gmd:CI_OnLineFunctionCode>
        </gmd:function>
      </gmd:CI_OnlineResource>
    </gmd:online>
  </gmd:MD_DigitalTransferOptions>
</gmd:transferOptions>

mjanez added a commit to mjanez/iso-19139-to-dcat-ap that referenced this issue Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback-requested Community feedback requested
Projects
None yet
Development

No branches or pull requests

3 participants