-
Notifications
You must be signed in to change notification settings - Fork 1
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
URN-encoded Coordinate Reference System fails validation #7
Comments
Comment by nmtoken Can you point out the rule(s) in the TG that you think aren't being checked to allow a urn. For example
So one must be given
So if that one is in Annex D4, it must be an HTTP URI and not a URN. |
Comment by archaeogeek In all honesty, @PeterParslow asked me to submit this so I'll defer to his better knowledge! |
Comment by nmtoken Hmm, in fact that file doesn't fail on any Metadata Item 17 - Spatial Reference System rules... The record passes the TG Requirement 2.1: metadata/2.0/req/isdss/crs rule (MI-17a) and rules MI17b, c ,d don't test for TG Requirement 2.2: metadata/2.0/req/isdss/crs-id So
should validate against the For ETRS89-GRS80 you should use Now I'm wondering whether we need a stricter rule in the Metadata Item 17 - Spatial Reference System rules to fail such a record. |
Comment by nmtoken Incidentally the example file is not valid, fails on multiple ' Free text elements should not be empty'
|
Comment by archaeogeek It was never checked for validation against everything- just rigged up to demo a number of CRS scenarios for @PeterParslow . Try the attached one which has the empty elements removed There's a wider question in the other open issue that only the first CRS should be checked to see if it's one of the recommended ones, the others shouldn't fail (or even warn really) if the first one is OK. |
Comment by PeterParslow Here's what I said to Jo about this particular example (I haven't actually checked the uploaded one):The URN encoding fails INSPIRE TG Requirement 2.2 - we need an extra rule in the MI-17 series. Would you like to raise an issue on GitHub?What I'm suggesting is what James has come to: I think this needs a stricter MI-17. Perhaps that's "an extra rule" or perhaps a tweak to one of the current ones. The message returned is also misleading, saying that EPSG::4258 isn't an INSPIRE default CRS, when actually its the encoding of that into the metadata that's wrong (if it's e.g. code & codespace, or URN) |
Comment by nmtoken Not such a fan on using first listed element, for a couple of reasons ~ it adds a constraint that isn't in the requirements, and it can make it more difficult for clients to build/manage the metadata. In this case first (implying the rule applies to one) is also not correct, the rule should apply to all CRS that are listed in Annex D4 For the supplemental schematron warnings (SP-4a/SP-4b), would a better message be that |
Comment by archaeogeek There are two issues here- the first is that the documentation at https://www.agi.org.uk/gemini/40-gemini/1062-gemini-datasets-and-data-series#17 and the validation rules don't agree. The second is that it's not possible to have a valid Gemini record that includes British National Grid as a CRS (in any encoding) because it's not in the INSPIRE list, if the rule insists on checking every entry. |
Comment by nmtoken I think strictly the validation rules (what you must pass, as opposed warnings) and documentation do currently agree. If you can use There is a potential issue that you get a warning if you use any CRS that doesn't use an identifier specified in Annex D4. They were intended to be a From my understanding of the INSPIRE legislation I had a feeling that a dataset/service that only supported EPSG:27700 (or rather a metadata record that only reported support for EPSG:27700) would not be a valid record, e.g. from
Though it might be an exception under If a new rule gets added to Metadata Item 17, to check that if the CRS listed is one in Annex D4, to require it uses the specified HTTP-URI as identifier, then it must only check the D4 list; a CRS that lists EPSG:27700 would not fail this validation check. The question is whether there should be another check (supplemental) to see if at least one CRS from D4 is listed, it can only be a warning though because it's possible to have a CRS not listed in D4. Notethe datum shall be the datum of the European Terrestrial Reference System 1989 (ETRS89) in areas within its geographical scope The datum is described by https://epsg.org/datum_6258/European-Terrestrial-Reference-System-1989-ensemble.html The extent is described by https://epsg.org/extent_1298/Europe-ETRF-by-country.html
|
Comment by PeterParslow I think that so far our approach for GEMINI is to implement the INSPIRE Metadata Technical Guidelines, not "just" the legislation. Publishers do have the option of (trying to) satisfy INSPIRE legislation/regulation in other ways, but I don't think we need to create support for those 'other ways'. TG Requirement 2.2 tells us what to do with CRSs that are in Annex D.4. For CRSs that aren't in that list (such as EPSG:27700), only TG Requirement 2.1 would apply (code+codeSpace), which says nothing about how the "code" is encoded (URN, URI) - just that it shall use a CRS "specified in a well-known common register". Either way, some of the requirements would be very difficult to check in Schematron! I think if the data is only available in EPSG:27700 then the data may not be in line with its technical specification - the IR Requirement allows for various exceptions. It is still possible to create a metadata record that conforms to the Metadata TG and describes a "possibly not conforming" dataset. |
Comment by nmtoken I did muse on the possibility of using the conformance statement to Commission Regulation (EU) No 1089/2010 as a trigger for/condition within a test, but it has limited use even then. I did also consider the possibility of checking the extent of the dataset to see if it lies outside of the datum of the European Terrestrial Reference System 1989 (ETRS89) , and using that as a condition within a test, but I think it could only be used as a warning at best. |
Comment by nmtoken I think we agree that we should add a ruleset to the Metadata Item 17 - Spatial Reference System rules that test for TG Requirement 2.2. In such a ruleset the XML example provided with one CRS using a URN identifier (urn:ogc:def:crs:EPSG::4258) would fail validation, because EPSG:4258 is in the list of default CRS, and as such requires the specified HTTP-URI identifier (http://www.opengis.net/def/crs/EPSG/0/4258). A metadata record using only one CRS where that CRS is EPSG:27700, would pass this new rule (and existing rules). Do we need to have a ruleset to warn (so supplemental) that such a record is, or is likely to be, invalid[1], because the regulation stipulates that a dataset with UK coverage (because the UK landmass falls within the scope of the datum of the European Terrestrial Reference System 1989 (ETRS89)) should use a CRS using ETRS89? Such a rule could be generic (CRS is not in D4) or specific to EPSG:27700 Should we have a ruleset to warn (so supplemental) that none of the listed CRS in the metadata records is in D4. In such a ruleset a record that listed EPSG:27700 and http://www.opengis.net/def/crs/EPSG/0/4258 would pass. Or is the feeling that rulesets to warn on potential CRS issues are confusing and should be removed? [1] Because AFAICT the whole of EPSG:27700 lies within the extent scope of the cited datum (so 1.3.4.2 doesn't apply), and no spatial data theme specifies it (so 1.3.4.1 also doesn't apply). Or is it that the UK is not regarded as continental Europe (even though the continental margin is in the Atlantic), and the British government has defined EPSG:27700 as a suitable CRS so (so (1.3.4.2 does apply) |
Comment by PeterParslow I agree with your suggested addition to MI 17. I'm not sure what the difference is between your two suggested supplemental rules, except in the wording of the message, which I think should combine them - "may be invalid because non of the listed CRS is in Annex D4 of the Metadata Regulation. Data geographically in Europe should be available in ETRS89; outside this it should be in WGS84". but actually, people might then expect us to have looked at the bounding box to decide for them! Below that of course is the subtle clash that we've said "GEMINI records should satisfy INSPIRE", but not that the datasets have to - and if the dataset isn't available in ETRS89, it wouldn't really be correct in describing it as if it were. [1] there used to be a "UK Location Programme" document on CRSs, among which it clarified that the UK is in Europe for this purpose. I guess that clarification should be added to https://www.gov.uk/government/publications/open-standards-for-government/exchange-of-location-point |
Issue by archaeogeek
Mon Jan 25 14:10:30 2021
Originally opened as AGIuk/Schematron#6
A URN-coded CRS of the form in the attached xml (zipped) fails validation. It would appear that an additional rule in MI-17 (https://github.com/AGIGemini/Schematron/blob/master/GEMINI_2.3_Schematron_Schema-v1.0.sch#L419-L481) is required to address this.
epsg4258_urn.zip
The text was updated successfully, but these errors were encountered: