ISO-19139_che zu DCAT-AP CH

Conversion des géométadonnées pour opendata.swiss

Pour pouvoir être publiées sur opendata.swiss, les géométadonnées doivent être converties de la norme ISO 19139 dans celle appliquée par le portail des données ouvertes (DCAT-AP CH). La présente documentation décrit comment procéder en général à la conversion de géométadonnées réunies sous ISO 19139 vers la norme DCAT-AP CH, passage obligé pour les publier sur opendata.swiss. Il s’agit concrètement d’une sérialisation XML via XPath .

Cette documentation n’est pour l’heure disponible qu’en anglais.

DCAT-AP CH Standard Overview

This documentation describes the mapping from ISO-19139_che to DCAT-AP CH. ISO-19139_che is a standard used by geocat.ch, a data source from which opendata.swiss harvests datasets.

In this documentation we focus on the XML serialization of ISO-19139_che and therefore describe the mapping in form of XPath (if not noted differently).

Example-Catalog

Example XML serialization of an ISO-19139_che dataset

Overview

Geocat Distributions //gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource are mapped either to the dcat:Dataset class or to the dcat:Distribution class, depending on .//gmd:protocol

The « Mapped from » column in the table gives just a hint on where the metadata is taken from. Please see the field descriptions for the actual mapping.

Mapping to dcat:Dataset

Mapping to dcat:Distribution

Mappings of //gmd:DistributionInfo to dcat:Distribution

DCAT property

Mapped from

Usage Notes

dct:issued

//gmd:identificationInfo//gmd:citation//gmd:CI_Date

taken from the Dataset

dcat:accessURL

.//gmd:linkage

dct:rights

//gmd:resourceConstraints

derived for the dataset

dct:title

.//gmd:name

in combination with protocol

dct:description

.//gmd:description

dcat:byteSize

mapping not implemented

media type

.//gmd:protocol

derived from the protocol

dct:format

.//gmd:protocol

derived from the protocol

dct:language

.//gmd:linkage//che:LocalisedURL

depends on localized urls

dct:modified

//gmd:identificationInfo//gmd:citation//gmd:CI_Date

taken from the Dataset

dct:license

mapping not implemented

dct:identifier

mapping not implemented

download url

.//gmd:linkage

download protocols only

coverage

mapping not implemented

Dataset

//gmd:fileIdentifier to dct:identifier

DCAT

dct:identifier

XPATH

//gmd:fileIdentifier

Value

gco:CharacterString/text()

Usage Notes

the internal id of the dataset is taken from the XPath //gmd:fileIdentifier and combined with the slug of the publishing organization to form the value of dct:identifier, with the format <id>@<organization-slug>.

ISO-19139_che XPath for dct:identifier
//gmd:fileIdentifier/gco:CharacterString/text()

Example for geocat mapping to dct:identifier

/gmd:identificationInfo//gmd:citation//gmd:title to dct:title

DCAT

dct:title

XPATH

//gmd:identificationInfo//gmd:citation//gmd:title

Value

.//gmd:textGroup/gmd:LocalisedCharacterString[@locale="<lang code>"]/text()

Fallback-Value

.//gmd:CharacterString/text()

Usage Notes

<lang code> is expected as DE, EN, FR, IT. In case the localized strings are not there the Fallback will be used for all 4 languages

ISO-19139_che XPath for dct:title
//gmd:identificationInfo//gmd:citation//gmd:title//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#DE]/text()
//gmd:identificationInfo//gmd:citation//gmd:title//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#EN]/text()
//gmd:identificationInfo//gmd:citation//gmd:title//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#FR]/text()
//gmd:identificationInfo//gmd:citation//gmd:title//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#IT]/text()
//gmd:identificationInfo//gmd:citation//gmd:title//gco:CharacterString/text()

Example for geocat-mapping to dct:title

/gmd:identificationInfo//gmd:abstract to dct:description

DCAT

dct:description

XPATH

//gmd:identificationInfo//gmd:abstract

Value

.//gmd:textGroup/gmd:LocalisedCharacterString[@locale="<lang code>"]/text()

Fallback-Value

.//gmd:CharacterString/text()

Usage Notes

<lang code> is expected as DE, EN, FR, IT. In case the localized strings are not there the Fallback will be used for all 4 languages

ISO-19139_che XPath for dct:description
//gmd:identificationInfo//gmd:abstract//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#DE]/text()
//gmd:identificationInfo//gmd:abstract//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#EN]/text()
//gmd:identificationInfo//gmd:abstract//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#FR]/text()
//gmd:identificationInfo//gmd:abstract//gmd:textGroup/gmd:LocalisedCharacterString[@LOCALE=#IT]/text()
//gmd:identificationInfo//gmd:abstract//gmd:CharacterString/text()

Example for geocat-mapping to dct:description

gmd:pointOfContact or //gmd:contact to dct:publisher

DCAT

dct:publisher

XPATH

//gmd:identificationInfo/gmd:pointOfContact or //gmd:contact//che:CHE_CI_ResponsibleParty (fallback value)

Filter

.//gmd:CI_RoleCode/@codeListValue

Value

.//gmd:organisationName/gco:CharacterString/text()

Usage Notes

The publisher consists of a name and a uri. Currently only the publisher name is mapped from the geocat dataset: For the uri the url of the organization that the dataset belongs on opendata.swiss is taken: https://opendata.swiss/de/organization.

gmd:contact is the metadata contact registered in geocat.ch and is only used as a fallback value.

ISO-19139_che XPath for dct:publisher: the first is taken in the following order:
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "publisher"]//gmd:organisationName/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "owner"]//gmd:organisationName/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "pointOfContact"]//gmd:organisationName/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "distributor"]//gmd:organisationName/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "custodian"]//gmd:organisationName/gco:CharacterString
//gmd:contact//che:CHE_CI_ResponsibleParty//gmd:organisationName/gco:CharacterString

Example for geocat mapping to dct:publisher

gmd:pointOfContact or //gmd:contact to dct:contactPoint

DCAT

dcat:contactPoint

XPATH

//gmd:identificationInfo/gmd:pointOfContact or //gmd:contact (fallback value)

Value

gmd:electronicMailAddress/gco:CharacterString

Usage Notes

Only one contact email is taken. A corresponding name is not taken.

gmd:contact is the metadata contact registered in geocat.ch and is only used as a fallback value.

ISO-19139_che XPath for dcat:contactPoint: the first is taken in the following order
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "pointOfContact"]//gmd:address//gmd:electronicMailAddress/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "owner"]//gmd:address//gmd:electronicMailAddress/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "publisher"]//gmd:address//gmd:electronicMailAddress/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "distributor"]//gmd:address//gmd:electronicMailAddress/gco:CharacterString
//gmd:identificationInfo//gmd:pointOfContact[.//gmd:CI_RoleCode/@codeListValue = "custodian"]//gmd:address//gmd:electronicMailAddress/gco:CharacterString
//gmd:contact//che:CHE_CI_ResponsibleParty//gmd:address//gmd:electronicMailAddress/gco:CharacterString

Example for geocat mapping to dcat:contactPoint

//gmd:distributionInfo/gmd:MD_Distribution to dcat:distribution

DCAT

dcat:distribution

XPATH

//gmd:distributionInfo/gmd:MD_Distribution[//gmd:transferOptions//gmd:CI_OnlineResource

protocol

//gmd:distributionInfo/gmd:MD_Distribution[//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol

Mapping

The mapping depends on the protocol. If the Protocol starts in the following way it is mapped to a dcat:Distribution: WWW:DOWNLOAD, OGC:WMTS, OGC:WFS, OGC:WMS, LINKED:DATA, ESRI:REST, MAP:Preview

Usage Notes

Only the above geocat Distributions will be mapped to dcat:Distribution. There are other protocols that will be mapped to dcat:landingPage and dct:relation.

ISO-19139_che XPath for getting the protocols for the geocat distributions
//gmd:distributionInfo/gmd:MD_Distribution[//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol/gco:CharacterString/text()

Example of getting the protocols for dcat:distribution

//gmd:identificationInfo//gmd:citation//gmd:CI_Date to dct:issued

DCAT

dct:issued

XPATH

//gmd:identificationInfo//gmd:citation//gmd:CI_Date

Role

publication or creation or revision

Value

.//gco:Date or .//gco:DateTime

Usage Notes

This also serves as dct:issued for dcat:Distribution

The first found date is taken in the order defined below:
//gmd:identificationInfo//gmd:citation//gmd:CI_Date[.//gmd:CI_DateTypeCode/@codeListValue = "publication"]//gco:Date or gco:DateTime
//gmd:identificationInfo//gmd:citation//gmd:CI_Date[.//gmd:CI_DateTypeCode/@codeListValue = "creation"]//gco:Date or gco:DateTime
//gmd:identificationInfo//gmd:citation//gmd:CI_Date[.//gmd:CI_DateTypeCode/@codeListValue = "revision"]//gco:Date or gco:DateTime

Example for geocat mapping to dct:issued

//gmd:identificationInfo//gmd:citation//gmd:CI_Date to dct:modified

DCAT

dct:modified

XPATH

//gmd:identificationInfo//gmd:citation//gmd:CI_Date

Role

revision

Value

//gco:Date or //gco:DateTime

Usage Notes

This also serves as dct:modified for dcat:Distribution

The date for the role revision is taken
//gmd:identificationInfo//gmd:citation//gmd:CI_Date[.//gmd:CI_DateTypeCode/@codeListValue = "revision"]//gco:Date or gco:DateTime

Example for geocat mapping to dct:modified

//gmd:identificationInfo//gmd:topicCategory/ to dcat:theme

DCAT

dct:theme

XPATH

//gmd:identificationInfo//gmd:topicCategory/

Mapping of values

Geocat topicCategory values are mapped to themes from the DCAT-AP CH themes vocabulary: in rdf/xml in turtle For details of the mapping, see below.

getting category with XPATH
//gmd:identificationInfo//gmd:topicCategory/gmd:MD_TopicCategoryCode
Mapping of topicCategory to themes
swisstopo_to_ogdch_group_mapping = {
    'imageryBaseMapsEarthCover': ['geography', 'territory'],
    'imageryBaseMapsEarthCover_BaseMaps': ['geography', 'territory'],
    'imageryBaseMapsEarthCover_EarthCover': ['geography', 'territory'],
    'imageryBaseMapsEarthCover_Imagery': ['geography', 'territory'],
    'location': ['geography', 'territory'],
    'elevation': ['geography', 'territory'],
    'boundaries': ['geography', 'territory'],
    'planningCadastre': ['geography', 'territory'],
    'planningCadastre_Planning': ['geography', 'territory'],
    'planningCadastre_Cadastre': ['geography', 'territory'],
    'geoscientificInformation': ['geography', 'territory'],
    'geoscientificInformation_Geology': ['geography', 'territory'],
    'geoscientificInformation_Soils': ['geography', 'territory'],
    'geoscientificInformation_NaturalHazards': ['geography', 'territory'],
    'biota': ['geography', 'territory', 'agriculture'],
    'oceans': ['geography', 'territory'],
    'inlandWaters': ['geography', 'territory'],
    'climatologyMeteorologyAtmosphere': ['geography', 'territory'],
    'environment': ['geography', 'territory'],
    'environment_EnvironmentalProtection': ['geography', 'territory'],
    'environment_NatureProtection': ['geography', 'territory'],
    'society': ['geography', 'culture', 'population'],
    'health': ['geography', 'health'],
    'structure': ['geography', 'construction'],
    'transportation': ['geography', 'mobility'],
    'utilitiesCommunication': ['geography', 'territory', 'energy', 'culture'],
    'utilitiesCommunication_Energy': ['geography', 'energy', 'territory'],
    'utilitiesCommunication_Utilities': ['geography', 'territory'],
    'utilitiesCommunication_Communication': ['geography', 'culture'],
    'intelligenceMilitary': ['geography', 'public-order'],
    'farming': ['geography', 'agriculture'],
    'economy': ['geography', 'work', 'national-economy'],
}

Example for geocat mapping to dcat:theme

//gmd:identificationInfo//gmd:language to dct:language

DCAT

dct:language

XPATH

//gmd:identificationInfo//gmd:language

Value

gmd:LanguageCode

Usage Notes

only the languages German, French, Italian and English are mapped

ISO-19139_che XPath for dct:language
//gmd:identificationInfo//gmd:language/gmd:LanguageCode
Mapping of the language code from a 3 letter code to 2 letter code
language_mapping = {
    'ger': 'de',
    'fra': 'fr',
    'fre': 'fr',
    'eng': 'en',
    'ita': 'it',
}

Example for geocat mapping to dct:language

//gmd:distributionInfo/gmd:MD_Distribution to dct:landing-page

DCAT

dcat:landingPage

XPATH

//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource

Protocol

WWW:LINK, WWW:LINK-1.0-http--link

Value

.//gmd:linkage/gmd:URL/text()

Fallback-Value

'.//che:LocalisedURL for any language

Usage Notes

The protocol WWW:LINK-1.0-http--link is deprecated, please use WWW:LINK instead

ISO-19139_che XPath for geocat distribution
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource
ISO-19139_che XPath for distribution protocol
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol

Example for geocat mapping to dcat:landingPage

//gmd:distributionInfo/gmd:MD_Distribution to dct:relation

DCAT

dct:relation

XPATH

//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource

Protocol

WWW:LINK, CHTOPO:specialised-geoportal, WWW:LINK-1.0-http--link

Value

For the url: .//gmd:linkage/gmd:URL/text(); for the text: .//gmd:description

Fallback-Value

For the url: .//che:LocalisedURL for any language; for the text: the url is used as a fallback

Usage Notes

The protocol WWW:LINK-1.0-http--link is deprecated, please use WWW:LINK instead The first WWWW:LINK is taken as dcat:landingPage, all further WWW-LINK Resources are added to dct:relation

ISO-19139_che XPath for geocat distribution`
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource
ISO-19139_che XPath for distribution protocol
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol

Example for geocat mapping to dct:relation

//gmd:identificationInfo//gmd:descriptiveKeywords to dcat:keyword

DCAT

dcat:keyword

XPATH

//gmd:identificationInfo//gmd:descriptiveKeywords//gmd:keyword

Value

//gmd:textGroup//gmd:LocalisedCharacterString

Usage Notes

all keywords with the Locale #DE, #FR, #EN, #IT are taken. The keyword opendata.swiss is not taken: it serves to mark which datasets should be imported to opendata.swiss

ISO-19139_che XPath for dcat:keyword
//gmd:identificationInfo//gmd:descriptiveKeywords//gmd:keyword//gmd:textGroup//gmd:LocalisedCharacterString

Example for geocat mapping to dcat:keyword

//gmd:identificationInfo//gmd:extent//gmd:description to dct:spatial

DCAT

dct:spatial

XPATH

//gmd:identificationInfo//gmd:extent//gmd:description

Value

./gco:CharacterString/text()

ISO-19139_che XPath for dacat
//gmd:identificationInfo//gmd:extent//gmd:description/gco:CharacterString/text()

Example for geocat mapping to dct:spatial

//gmd:identificationInfo//gmd:extent//gmd:temporalElement to dct:temporal

DCAT

dct:temporal

XPATH

//gmd:identificationInfo//gmd:extent//gmd:temporalElement

Value

//gml:TimePeriod/gml:beginPosition, //gml:TimePeriod/gml:endPosition

getting temporals with XPATH
//gmd:identificationInfo//gmd:extent//gmd:temporalElement//gml:TimePeriod/gml:beginPosition
//gmd:identificationInfo//gmd:extent//gmd:temporalElement//gml:TimePeriod/gml:endPosition

Example for geocat mapping to dct:temporal

//gmd:identificationInfo//che:CHE_MD_MaintenanceInformation to dct:accrualPeriodicity

DCAT

dcat:accrualPeriodicity

XPATH

//gmd:identificationInfo//che:CHE_MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/

Value

gmd:MD_MaintenanceFrequencyCode/@codeListValue

Mapping of values

For the mapping of Frequency Codes see below

getting frequency with XPATH
//gmd:identificationInfo//che:CHE_MD_MaintenanceInformation/gmd:maintenanceAndUpdateFrequency/gmd:MD_MaintenanceFrequencyCode/@codeListValue
Mapping of the Frequency Codes
frequency_mapping = {
    'continual':
      'http://publications.europa.eu/resource/authority/frequency/CONT',
    'daily':
      'http://publications.europa.eu/resource/authority/frequency/DAILY',
    'weekly':
      'http://publications.europa.eu/resource/authority/frequency/WEEKLY',
    'fortnightly':
      'http://publications.europa.eu/resource/authority/frequency/BIWEEKLY',
    'monthly':
      'http://publications.europa.eu/resource/authority/frequency/MONTHLY',
    'quarterly':
      'http://publications.europa.eu/resource/authority/frequency/QUARTERLY',
    'biannually':
      'http://publications.europa.eu/resource/authority/frequency/ANNUAL_2',
    'annually':
      'http://publications.europa.eu/resource/authority/frequency/ANNUAL',
    'asNeeded':
      'http://publications.europa.eu/resource/authority/frequency/IRREG',
    'irregular':
      'http://publications.europa.eu/resource/authority/frequency/IRREG',
}

Example for geocat mapping to dct:accrualPeriodicity

//gmd:identificationInfo//gmd:aggregationInfo to dcat:qualifiedRelation

DCAT

dcat:qualifiedRelation

XPATH

//gmd:identificationInfo//gmd:aggregationInfo//gmd:aggregateDataSetIdentifier/gmd:MD_Identifier

Value

/gmd:code/gco:CharacterString

Mapping of Values

The geocat identifier is mapped to a dct:identifier by attaching @<organization-slug>

XPATH for dcat:qualifiedRelation: all such values are taken
//gmd:identificationInfo//gmd:aggregationInfo//gmd:aggregateDataSetIdentifier/gmd:MD_Identifier/gmd:code/gco:CharacterString

Example for geocat mapping to dcat:qualifiedRelation

//gmd:distributionInfo/gmd:MD_Distribution to foaf:page

DCAT

foaf:page

XPATH

//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource

Protocol

WWW:LINK

Value

.//gmd:linkage/gmd:URL/text()

Fallback-Value

'.//che:LocalisedURL for any language

Usage Notes

The first resource with WWW:LINK protocol is mapped as dcat:landingPage. All other resources with WWW:LINK protocol are mapped as foaf:page.

ISO-19139_che XPath for foaf:page
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource
ISO-19139_che XPath for distribution protocol
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol

Example for geocat mapping to foaf:page

//che:dataModel//che:LocalisedURL to dct:conformsTo

DCAT

dct:conformsTo

XPATH

che:CHEMD_Metadata/gmd:contentInfo/che:CHE_MD_FeatureCatalogueDescription/che:dataModel/

Value

.//gmd:contentInfo//che:CHE_MD_FeatureCatalogueDescription//che:dataModel/text()

Usage Notes

ISO-19139_che XPath for dct:conforms to
.//gmd:contentInfo//che:CHE_MD_FeatureCatalogueDescription//che:dataModel//che:PT_FreeURL//che:URLGroup//che:LocalisedURL[@locale="#DE"]/text()
.//gmd:contentInfo//che:CHE_MD_FeatureCatalogueDescription//che:dataModel//che:PT_FreeURL//che:URLGroup//che:LocalisedURLL[@locale="#FR"]/text()
.//gmd:contentInfo//che:CHE_MD_FeatureCatalogueDescription//che:dataModel//che:PT_FreeURL//che:URLGroup//che:LocalisedURL[@locale="#EN"]/text()
.//gmd:contentInfo//che:CHE_MD_FeatureCatalogueDescription//che:dataModel//che:PT_FreeURL//che:URLGroup//che:LocalisedURL[@locale="#IT"]/text()
.//gmd:contentInfo//che:CHE_MD_FeatureCatalogueDescription//che:dataModel//che:PT_FreeURL//che:URLGroup//che:LocalisedURL/text()

Example for geocat mapping to dct:conformsTo

Distribution

Set dcat:accessURL

DCAT

dcat:accessURL

XPATH

//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource

Mapping

The mapping depends on the protocol. If the protocol starts in the following way it is mapped to a dcat:Distribution: WWW:DOWNLOAD, OGC:WMTS, OGC:WFS, "OGC:WMS, LINKED:DATA, ESRI:REST, MAP:Preview, WWW:DOWNLOAD-APP

Value

.//gmd:linkage/gmd:URL/text()

Fallback-Value

'.//che:LocalisedURL for any language

Usage Notes

For the protocol WWW:DOWNLOAD the protocol should include the format of the resource: for example WWW:DOWNLOAD:INTERLIS

ISO-19139_che XPath for geocat distribution`
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource
ISO-19139_che XPath for distribution protocol
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol

Example of a « LINKED:DATA » Distribution

Set dcat:downloadURL

DCAT

dcat:downloadURL

XPATH

//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource

Protocol

.//gmd:protocol/gco:CharacterString WWW:DOWNLOAD

Value

.//gmd:linkage/gmd:URL/text()

Fallback-Value

'.//che:LocalisedURL for any language

Usage Notes

For the protocol WWW:DOWNLOAD the same url is mapped to both dcat:accessURL and dcat:downloadURL

default path of the download url within the geocat distribution
.//gmd:linkage//gmd:URL/text()

Example of a « WWW:DOWNLOAD » Distribution

Set dct:rights

DCAT

dct:rights

XPATH

//gmd:resourceConstraints//gmd:otherConstraints

Mapping of values

Geocat rights statements are mapped to rights statements from the DCAT-AP CH rights vocabulary: RIGHTS-RDF, RIGHTS-Turtle. For details of the mapping, see below.

getting rights statements with XPATH
//gmd:resourceConstraints//gmd:otherConstraints
Mapping of rights statements
    rights = {
        u'Freie Nutzung': 'NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired',
        u'Utilisation libre': 'NonCommercialAllowed-CommercialAllowed-ReferenceNotRequired',

        u'Freie Nutzung. Quellenangabe ist Pflicht.': 'NonCommercialAllowed-CommercialAllowed-ReferenceRequired',
        u'Utilisation libre. Obligation d’indiquer la source.': 'NonCommercialAllowed-CommercialAllowed-ReferenceRequired',

        u'Freie Nutzung. Kommerzielle Nutzung nur mit Bewilligung des Datenlieferanten zulässig.': 'NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired',
        u'Utilisation libre. Utilisation à des fins commerciales uniquement avec l’autorisation du fournisseur des données.': 'NonCommercialAllowed-CommercialWithPermission-ReferenceNotRequired',

        u'Freie Nutzung. Quellenangabe ist Pflicht. Kommerzielle Nutzung nur mit Bewilligung des Datenlieferanten zulässig.': 'NonCommercialAllowed-CommercialWithPermission-ReferenceRequired',
        u'Utilisation libre. Obligation d’indiquer la source. Utilisation commerciale uniquement avec l’autorisation du fournisseur des données.': 'NonCommercialAllowed-CommercialWithPermission-ReferenceRequired'
    }

Example for geocat mapping to dct:rights

Set dcat:mediaType

DCAT

dcat:mediaType

Usage-Notes

For protocol « WWW:DOWNLOAD » the media type is derived by splitting the protocol name: the protocol name is expected as <download-protocol>:<media-type>. For protocols « OGC:WMTS », « OGC:WMS », « OGC:WFS », « LINKED:DATA », « MAP:Preview », « ESRI:REST » the dcat:mediaType is « SERVICE »

ISO-19139_che XPath for distribution protocol
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol

Example of a « WWW:DOWNLOAD » Distribution with dcat:mediaType « INTERLIS »

Set dct:format

DCAT

dct:format

Usage-Notes

For protocol « WWW:DOWNLOAD » the format is derived in the same way as the media type. For the other protocols the format is derived from the protocol as described in the mapping below.

ISO-19139_che XPath for distribution protocol
//gmd:distributionInfo/gmd:MD_Distribution//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol
Mapping of protocol names to dct:format of dcat:Distribution
protocol_to_format_mapping = {
    "OGC:WMTS": "WMTS",
    "OGC:WMS": "WMS",
    "OGC:WFS": "WFS",
    "ESRI:REST": "API"
}

Example of a « WWW:WMS » Distribution with dct:format « WMS »

Set dct:title

DCAT

dct:title

XPATH

Mapping depends on the type of distribution that is derived from the protocol

Protocol

//gmd:transferOptions//gmd:CI_OnlineResource//gmd:protocol/gco:CharacterString

Name

.//gmd:distributionInfo//gmd:transferOptions//gmd:name

Usage Notes

The title of the distribution is derived by mapping the normed protocol name to a derived protocol name and then adding the name of the Distribution.

relative XPath to the protocol of a Distribution
.//gmd:distributionInfo//gmd:transferOptions//gmd:protocol/gco:CharacterString
ISO-19139_che XPath for the name of a Distribution
.//gmd:distributionInfo//gmd:transferOptions/gmd:name
Mapping of protocol names to dct:title of dcat:Distribution
protocol_to_name_mapping = {
    "OGC:WMTS": "WMTS",
    "OGC:WMS": "WMS",
    "OGC:WFS": "WFS",
    "WWW:DOWNLOAD": "Download",
    "LINKED:DATA": "Linked Data (Dienst)",
    "MAP:Preview": "Map (Preview)",
    "ESRI:REST": "ESRI (Rest)"
}

Example for geocat mapping to dct:title

Set dct:description

DCAT

dct:description

XPATH

//gmd:distributionInfo//gmd:transferOptions//gmd:description

relative XPath in the Distribution
.//gmd:description//gmd:LocalisedCharacterString

Example for geocat mapping to dct:description

Set dct:language

DCAT

dct:language

Usage-Notes

The language is derived from the languages that a localized url is offered for.

Example for geocat mapping to dct:language