agiorguk / gemini

Resources relating to the UK Gemini metadata profile
5 stars 3 forks source link

2020-28 Spatial resolution preferred over Equivalent scale (Sean Gaffney, October 2020) #15

Open PeterParslow opened 3 years ago

PeterParslow commented 3 years ago

Sean asked. “Is it possible to have a valid dataset in GEMINI that has both equivalent scale and spatial resolution populated?” Email exchange of John, Peter, Rob concluded it should only be one or the other. James P set about amending the Schematron (offline)

This is mentioned as a comment on Equivalent scale.

Proposal: It would be better to make it an actual rule: i.e. Equivalent scale shall not be given if Spatial resolution is given. This could then be enforced in Schematron.

PeterParslow commented 3 years ago

Agreed, but also it would be helpful to those distributing data generated from digitised maps, without access to information about the original survey resolution, that there is also a comment added to Spatial resolution to say the same thing the other way round:

"Expression of spatial resolution by distance is preferred. Where a distance cannot be determined, for example the resolution of the original data capture is unknown, an Equivalent scale may be given instead."

archaeogeek commented 3 years ago

I agree, but if it's to be made a rule, then the comment should probably be stronger, eg:

"Expression of spatial resolution by distance is preferred. Only in such cases where a distance cannot be determined, for example the resolution of the original data capture is unknown, an equivalent scale should be given instead."

PeterParslow commented 3 years ago

2021-06-08 INSPIRE TG is quite specific about this

  1. Change Obligation to conditional, with the text in the proposal
  2. Strengthen the guidance as in Jo's comment

James P to find the Schematron rules that he'd updated Would need implementation in GeoNetwork, so Jo would prefer this to be part of a patch release.

nmtoken commented 3 years ago
<sch:pattern fpi="Gemini2-mi18-resolution-and-scale">
    <sch:title>Spatial Resolution resolution-and-scale</sch:title>
    <sch:p>We need to test as per INSPIRE TG Requirement 1.5 that for a dataset or dataset series that we have EITHER equivalent scale or a resolution distance WHERE they are described, but NEVER both.</sch:p>
    <sch:let name="srRD" value="count(//gmd:MD_Metadata[1]/gmd:identificationInfo[1]/*[1]/gmd:spatialResolution/*[1]/gmd:distance/gco:Distance)"/>
    <sch:let name="srES" value="count(//gmd:MD_Metadata[1]/gmd:identificationInfo[1]/*[1]/gmd:spatialResolution/*[1]/gmd:equivalentScale/gmd:MD_RepresentativeFraction/gmd:denominator/gco:Integer)"/>
    <sch:rule context="//gmd:MD_Metadata[1]/gmd:identificationInfo[1]/gmd:MD_DataIdentification">
      <sch:report
        test="($hierarchyLevelCLValue = 'dataset' or $hierarchyLevelCLValue = 'series') and ($srES &gt; 0 and $srRD &gt; 0)"
        > MI-18a (Spatial Resolution): Spatial resolution for data set or data set series shall be given using either equivalent scale or a resolution distance, provided that these have been specified for the described data sets. If both ways have been specified, only one of the ways shall be used.
        We have equivalent scale <sch:value-of select="$srES"/> and resolution distance <sch:value-of select="$srRD"/>
      </sch:report>
    </sch:rule>
</sch:pattern>
PeterParslow commented 3 years ago

See https://github.com/agiorguk/gemini-schematron/issues/5

nmtoken commented 9 months ago

Checking to see if can harvest from DGU CSW to test how breaking this change may actually be, and find an error in their config (see https://github.com/alphagov/datagovuk-tech-docs/issues/122 for details).

nmtoken commented 9 months ago

GDS Support Services Request received. Ticket Id: 5515092

nmtoken commented 9 months ago

As an aside, if this is found to be a breaking change then we will be talking about UK GEMINI 3.0 not UK GEMINI 2.4 if we are following semantic versioning

archaeogeek commented 8 months ago

@nmtoken not sure if you still need a CSW to test against- but here's the one for the Scottish SDI: https://spatialdata.gov.scot/geonetwork/srv/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities

archaeogeek commented 1 week ago

Another CSW to test against: https://metadata.naturalresources.wales/geonetwork/gemini/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities then (eg) https://metadata.naturalresources.wales/geonetwork/gemini/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=http://www.isotc211.org/2005/gmd&Id=NRW_DS98736&resultType=full

nmtoken commented 1 week ago

Another CSW to test against: https://metadata.naturalresources.wales/geonetwork/gemini/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities then (eg) https://metadata.naturalresources.wales/geonetwork/gemini/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetRecordById&outputSchema=http://www.isotc211.org/2005/gmd&Id=NRW_DS98736&resultType=full

1581 records harvested on 2024-07-03

Two fail on the MI-18a rule namely NRW_DS116207.xml and NRW_DS118975.xml

Both these records also fail GEMINI validation for AT-6: Free text elements should not be empty

NRW_DS116207.xml appears to be a test record...

*** This metadata entry is NOT REAL data. *** It is just acting as a test metadata entry for use internally within NRW and as an example for staff who are entering metadata. Test welsh character Coed Dol-gôch. EXAMPLE (Test for formatting): The aim of this data collection was to monitoring for otter spraints, holts and sightings on all major river systems and their tributaries across Wales. Surveying was carried out between April and October between 2005 and 2015. Each river was visited only once each year. The river systems covered included Usk, Tywi and Wye, all of which are designated under the Habitats Directive as Special Areas of Conservation (SACs). The main objectives of analyses were to: - Determine whether the distributions had changed over the monitoring period. - Determine the number of otter signs had changed in abundance over the monitoring period. *** This metadata entry is NOT REAL data. *** It is just acting as a test metadata entry for use internally within NRW and as an example for staff who are entering metadata. Test welsh character Coed Dol-gôch. EXAMPLE (Test for formatting): The aim of this data collection was to monitoring for otter spraints, holts and sightings on all major river systems and their tributaries across Wales. Surveying was carried out between April and October between 2005 and 2015. Each river was visited only once each year. The river systems covered included Usk, Tywi and Wye, all of which are designated under the Habitats Directive as Special Areas of Conservation (SACs). The main objectives of analyses were to: - Determine whether the distributions had changed over the monitoring period. - Determine the number of otter signs had changed in abundance over the monitoring period.

has:

  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:distance>
        <gco:Distance uom="urn:ogc:def:uom:EPSG::9001">10</gco:Distance>
      </gmd:distance>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:equivalentScale>
        <gmd:MD_RepresentativeFraction>
          <gmd:denominator>
            <gco:Integer>10000</gco:Integer>
          </gmd:denominator>
        </gmd:MD_RepresentativeFraction>
      </gmd:equivalentScale>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>

NRW_DS118975.xml has:

  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:distance>
        <gco:Distance uom="urn:ogc:def:uom:EPSG::9001">10.0</gco:Distance>
      </gmd:distance>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:equivalentScale>
        <gmd:MD_RepresentativeFraction>
          <gmd:denominator>
            <gco:Integer>12500.0</gco:Integer>
          </gmd:denominator>
        </gmd:MD_RepresentativeFraction>
      </gmd:equivalentScale>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
nmtoken commented 1 week ago

@nmtoken not sure if you still need a CSW to test against- but here's the one for the Scottish SDI: https://spatialdata.gov.scot/geonetwork/srv/eng/csw?SERVICE=CSW&VERSION=2.0.2&REQUEST=GetCapabilities

1140 records harvested on 2024-07-03

111 records that match the MI-18a rule

examples

  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:distance>
        <gco:Distance uom="m">30</gco:Distance>
      </gmd:distance>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:equivalentScale>
        <gmd:MD_RepresentativeFraction>
          <gmd:denominator>
            <gco:Integer>5000</gco:Integer>
          </gmd:denominator>
        </gmd:MD_RepresentativeFraction>
      </gmd:equivalentScale>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>

  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:distance>
        <gco:Distance uom="urn:ogc:def:uom:EPSG::9001">1e-9</gco:Distance>
      </gmd:distance>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:equivalentScale>
        <gmd:MD_RepresentativeFraction>
          <gmd:denominator>
            <gco:Integer>10000</gco:Integer>
          </gmd:denominator>
        </gmd:MD_RepresentativeFraction>
      </gmd:equivalentScale>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>

  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:distance>
        <gco:Distance uom="urn:ogc:def:uom:EPSG::9001">1</gco:Distance>
      </gmd:distance>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
  <gmd:spatialResolution>
    <gmd:MD_Resolution>
      <gmd:equivalentScale>
        <gmd:MD_RepresentativeFraction>
          <gmd:denominator>
            <gco:Integer>3000000</gco:Integer>
          </gmd:denominator>
        </gmd:MD_RepresentativeFraction>
      </gmd:equivalentScale>
    </gmd:MD_Resolution>
  </gmd:spatialResolution>
PeterParslow commented 1 week ago

Probably worth pointing out to them that their "test metadata entry for use internally within NRW" has escaped into the public space!

nmtoken commented 1 week ago

Probably worth pointing out to them that their "test metadata entry for use internally within NRW" has escaped into the public space!

The reference number for your enquiry is CAS-259863-H4F5

nmtoken commented 1 week ago

HTML copies of the test results can be found at:

Scottish SDI

NaturalResourcesWales

PeterParslow commented 1 week ago

I have moved this "back" to "In progress" because we haven't agreed what to implement yet (if anything)