Skip to content

Commit

Permalink
Standard / ISO19115-3 / Quality report / Index descriptive results (#…
Browse files Browse the repository at this point in the history
…8594)

ISO19115-3 adds possibility to provide descriptive results (and not only conformance and quantitative results). Properly index them in order to render them in measure table in record view (#7180)

```xml
<mdb:dataQualityInfo>
      <mdq:DQ_DataQuality>
         <mdq:scope>
            <mcc:MD_Scope>
               <mcc:level>
                  <mcc:MD_ScopeCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#MD_ScopeCode"
                                    codeListValue="dataset"/>
               </mcc:level>
            </mcc:MD_Scope>
         </mdq:scope>
         <mdq:report>
            <mdq:DQ_QuantitativeAttributeAccuracy>
               <mdq:measure>
                  <mdq:DQ_MeasureReference>
                     <mdq:nameOfMeasure>
                        <gco:CharacterString>Accuracy - overall</gco:CharacterString>
                     </mdq:nameOfMeasure>
                     <mdq:measureDescription>
                        <gco:CharacterString>Assessment of accuracy, linked to a certain Data Set or domain, which is summarising the various components into one single measure.

This metadata element is used to describe the main sources of random and systematic error in the statistical outputs, and provide a summary assessment of all errors with special focus on the impact on key estimates. The bias assessment can be in quantitative or qualitative terms, or both. It should reflect the producer's best current understanding (sign and order of magnitude) including actions taken to reduce bias. Revision aspects should also be included here if considered relevant.</gco:CharacterString>
                     </mdq:measureDescription>
                  </mdq:DQ_MeasureReference>
               </mdq:measure>
               <mdq:result>
                  <mdq:DQ_DescriptiveResult>
                     <mdq:statement>
                        <gco:CharacterString>-text-</gco:CharacterString>
                     </mdq:statement>
                  </mdq:DQ_DescriptiveResult>
               </mdq:result>
               <mdq:result>
                  <mdq:DQ_QuantitativeResult>
                     <mdq:value>
                        <gco:Record>1111</gco:Record>
                     </mdq:value>
                  </mdq:DQ_QuantitativeResult>
               </mdq:result>
            </mdq:DQ_QuantitativeAttributeAccuracy>
         </mdq:report>
      </mdq:DQ_DataQuality>
  </mdb:dataQualityInfo>
```

Co-authored-by: François Prunayre <[email protected]>
  • Loading branch information
geonetworkbuild and fxprunayre authored Jan 13, 2025
1 parent 357b3d9 commit 317edbf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1167,12 +1167,12 @@
<xsl:for-each select="mdq:report/*[
normalize-space(mdq:measure/*/mdq:nameOfMeasure/gco:CharacterString) != ''
or normalize-space(mdq:measure/*/mdq:measureDescription/gco:CharacterString) != ''
]/mdq:result/mdq:DQ_QuantitativeResult">
]/mdq:result/(mdq:DQ_QuantitativeResult|mdq:DQ_DescriptiveResult)">

<xsl:variable name="name"
select="(../../mdq:measure/*/mdq:nameOfMeasure/gco:CharacterString)[1]"/>
<xsl:variable name="value"
select="mdq:value"/>
select="mdq:value/gco:Record[. != '']|mdq:statement/gco:CharacterString[. != '']"/>
<xsl:variable name="unit"
select="mdq:valueUnit//gml:identifier"/>
<xsl:variable name="description"
Expand All @@ -1190,15 +1190,15 @@
"date": "<xsl:value-of select="gn-fn-index:json-escape($measureDate)"/>",
</xsl:if>
<!-- First value only. -->
"value": "<xsl:value-of select="util:escapeForJson($value/gco:Record[1])"/>",
"value": "<xsl:value-of select="util:escapeForJson($value[1])"/>",
<xsl:if test="$unit != ''">
"unit": "<xsl:value-of select="util:escapeForJson($unit)"/>",
</xsl:if>
"type": "<xsl:value-of select="local-name(.)"/>"
}
</measure>

<xsl:for-each select="mdq:value/gco:Record[. != '']">
<xsl:for-each select="$value">
<xsl:element name="measure_{gn-fn-index:build-field-name($name)}">
<xsl:value-of select="."/>
</xsl:element>
Expand Down

0 comments on commit 317edbf

Please sign in to comment.