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

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

Open
PeterParslow opened this issue Mar 10, 2021 · 17 comments
Labels
breaking The solution to this issue may make previously valid instances invalid Elements Issue that primarily affects the GEMINI elements release This change should be bundled into a release, because it needs software change

Comments

@PeterParslow
Copy link
Contributor

PeterParslow commented Mar 10, 2021

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 PeterParslow added the Elements Issue that primarily affects the GEMINI elements label Mar 10, 2021
@PeterParslow
Copy link
Contributor Author

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
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Contributor

nmtoken commented Jun 8, 2021

<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
Copy link
Contributor Author

See agiorguk/gemini-schematron#5

@PeterParslow PeterParslow added the release This change should be bundled into a release, because it needs software change label Jul 1, 2021
archaeogeek pushed a commit that referenced this issue Apr 14, 2023
added highlighttest to see if pygments is actually working in the git…
@archaeogeek archaeogeek added the breaking The solution to this issue may make previously valid instances invalid label Oct 4, 2023
@nmtoken
Copy link
Contributor

nmtoken commented Oct 4, 2023

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 alphagov/datagovuk-tech-docs#122 for details).

@nmtoken
Copy link
Contributor

nmtoken commented Oct 9, 2023

GDS Support Services Request received. Ticket Id: 5515092

@nmtoken
Copy link
Contributor

nmtoken commented Oct 18, 2023

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
Copy link
Member

@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

@nmtoken
Copy link
Contributor

nmtoken commented Jul 4, 2024

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...

<gmd:abstract xsi:type="gmd:PT_FreeText_PropertyType">
gco:CharacterString*** 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.</gco:CharacterString>
gmd:PT_FreeText
gmd:textGroup
<gmd:LocalisedCharacterString locale="#EN">*** 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.</gmd:LocalisedCharacterString>
</gmd:textGroup>
</gmd:PT_FreeText>
</gmd:abstract>

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
Copy link
Contributor

nmtoken commented Jul 4, 2024

@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
Copy link
Contributor Author

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

@nmtoken
Copy link
Contributor

nmtoken commented Jul 4, 2024

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
Copy link
Contributor

nmtoken commented Jul 4, 2024

HTML copies of the test results can be found at:

Scottish SDI

NaturalResourcesWales

@PeterParslow
Copy link
Contributor Author

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

@PeterParslow
Copy link
Contributor Author

So, Scotland has 111 records with both Spatial Resolution and Equivalent scale and MR Wales has two - so enforcing "either or" would break quite a lot of Scottish records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking The solution to this issue may make previously valid instances invalid Elements Issue that primarily affects the GEMINI elements release This change should be bundled into a release, because it needs software change
Projects
Status: In progress
Development

No branches or pull requests

3 participants