agiorguk / gemini

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

2021-03 Spatial reference system should not be required for Service records (Peter Parslow, Feb 2021) #21

Open PeterParslow opened 3 years ago

PeterParslow commented 3 years ago

See INSPIRE TG C.3.1 - not required for Network Services (Discovery, View, Download)

See INSPIRE TG C.1.2 and TG Requirement 6.1: metadata/2.0/req/sds-interoperable/crs - there are Interoperable Spatial Data Services that should provide it.

See also 2020-21 (both!)

6footdestiny commented 3 years ago

Im not sure of the reasoning behind not including it?

PeterParslow commented 2 years ago

Im not sure of the reasoning behind not including it?

Example: when creating a record for a CSW (Discovery Service), what Spatial reference system should I say it supports? I suppose the boundingBox (if requested) has to be in WGS84, and the boundingBoxes of any responses would be, but that's not to say that any records returned by the CSW describe things that are only in WGS84.

nmtoken commented 2 years ago

Network services would also include processing services like WPS and WCPS, where no Spatial reference system applies

archaeogeek commented 8 months ago

@nmtoken to check schematron rules

archaeogeek commented 8 months ago

@PeterParslow to check INSPIRE definition of Interoperable Spatial Data Services

nmtoken commented 8 months ago

INSPIRE (Infrastructure for Spatial Information in the European Community) defines "Interoperable Data Services" as services that allow for the exchange, sharing, and processing of spatial data from varied sources across Europe in a seamless and consistent way. These services are expected to comply with the regulations laid out in the INSPIRE Directive, which includes technical standards that ensure data interoperability, quality, and accessibility.

PeterParslow commented 8 months ago

https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32014R1312#d1e118-8-1

“interoperable spatial data service” means an invocable spatial data service which fulfils the requirements of Annex VI

i.e.

“Invocable spatial data service” means all of the following plus conformant metadata.

(a) a spatial data service with metadata which fulfils the requirements of Commission Regulation (EC) No 1205/2008 (5),

(b) a spatial data service with at least one resource locator that is an access point,

(c) a spatial data service in conformity with a documented and publicly available set of technical specifications providing the information necessary for its execution,

PeterParslow commented 1 week ago

As so often, the matched PR seems unrelated.

I think it is actually non-breaking in that we would relax the Obligation from "at least one" to "optional", so no currently-valid records would be made invalid.

Do we now agree that it should be optional?

nmtoken commented 6 days ago

@nmtoken to check schematron rules

Currently required for all services MI-17a (Spatial Reference System): At least one coordinate reference system used in the described dataset, dataset series, or service shall be given using gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier

Agree that it should be optional for services unless it's a SDS; so will need to need to check for an SDS keyword in the schematron.

Related to https://github.com/agiorguk/gemini/issues/78 ~ Will need an isSDS rule

PeterParslow commented 6 days ago

If we can test that, then the obligation should be "Conditional, required when describing an INSPIRE Spatial Data Service"

nmtoken commented 5 days ago

Possibly confusing myself here, but do we need to change the Spatial data service type guidance Metadata Item 37 - Spatial Data Service Type or schematron rule MI-37a (Spatial Data Service Type) ; at the moment we say that if the hierarchyLevel is service then you must supply one spatial data service type (one of 'discovery', 'view', 'download' , 'transformation', 'invoke' , 'other'), which implies that all network services are also SDS (and therefore need a coordinate reference system).

Or are we now saying that not all service records are SDS, and therefore don't need a Spatial Data Service Type (and that this subset of service records don't need a coordinate reference system)

Or are we saying that these service types define network services, and are required, but we have misrepresented them as Spatial Data Service Types.

However

See INSPIRE TG C.3.1 - not required for Network Services (Discovery, View, Download)

Discovery, View, Download are all included in the list of possible spatial data service types, and are also represented in the INSPIRE SpatialDataServiceCategory codelist with for example infoCatalogueService infoRegistryService, infoFeatureAccessService, infoMapAccessService, infoCoverageAccessService


I changed the schematron to only check for a spatial reference system where hierarchyLevel is dataset or series, or where hierarchyLevel is service and there is a keyword from the INSPIRE SpatialDataServiceCategory, but considering that infoMapAccessService is there and is a view service type (which is a type of network service...) I'm not so sure this is a valid test.

original test:

  <sch:pattern fpi="Gemini2-mi17-refSysInfo-1">
    <sch:p>The coordinate reference system(s) used in the described dataset or dataset series shall
      be given using element
      gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier
      INSPIRE Requirements metadata/2.0/req/sds-interoperable/crs and metadata/2.0/req/isdss/crs </sch:p>
    <sch:rule context="//gmd:MD_Metadata[1]">
      <sch:assert id="MI-17a"
        test="count(//gmd:MD_Metadata[1]/child::gmd:referenceSystemInfo/descendant::gmd:RS_Identifier) &gt; 0"
        > MI-17a (Spatial Reference System): At least one coordinate reference system used in the described dataset, dataset
        series, or service shall be given using
        gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier
      </sch:assert>
    </sch:rule>
  </sch:pattern>

revised tests currently:

  <sch:pattern fpi="Gemini2-mi17-refSysInfo-1a">
    <sch:p>The coordinate reference system(s) used in the described dataset or dataset series shall
      be given using element gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier
      INSPIRE Requirements metadata/2.0/req/isdss/crs </sch:p>   
    <sch:rule context="//gmd:MD_Metadata[1]">
      <sch:report id="MI-17a" test="($hierarchyLevelCLValue = 'dataset' or $hierarchyLevelCLValue = 'series') and $refSysInfoNum = 0">
        MI-17a (Spatial Reference System): At least one coordinate reference system used in the described dataset, dataset series shall be given using
        gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier.
        <sch:emph>DEBUG:</sch:emph> We have <sch:value-of select="$hierarchyLevelCLValue"/> and <sch:value-of select="$refSysInfoNum"/>
      </sch:report>
    </sch:rule>
  </sch:pattern>
  <sch:pattern fpi="Gemini2-mi17-refSysInfo-1b">
     <sch:p>The coordinate reference system(s) used in the spatial data service shall
      be given using element gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier
      INSPIRE Requirements metadata/2.0/req/sds-interoperable/crs</sch:p>
    <sch:rule context="//gmd:MD_Metadata[1]/gmd:identificationInfo[1]/srv:SV_ServiceIdentification/gmd:descriptiveKeywords/*[1]/gmd:keyword/child::*/text()">
      <sch:report id="MI-17sds" test="$hierarchyLevelCLValue = 'service' and $refSysInfoNum = 0 and
        $sdsClassCodes//cat/text()[normalize-space(.) = normalize-space(current()/.)]">
        MI-17sds (SDS Spatial Reference System): At least one coordinate reference system used in the described service shall be given using
        gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier.
        <sch:emph>DEBUG:</sch:emph> We have <sch:value-of select="$hierarchyLevelCLValue"/> and <sch:value-of select="$refSysInfoNum"/> and SDS Keyword <sch:value-of select="."/>
      </sch:report>
    </sch:rule>
  </sch:pattern>