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

Unexpected test failure: no AdministrativeUnit features found #142

Open
PeterParslow opened this issue Feb 6, 2018 · 11 comments
Open

Unexpected test failure: no AdministrativeUnit features found #142

PeterParslow opened this issue Feb 6, 2018 · 11 comments
Assignees
Labels
progress: fix to be implemented Resolution has been agreed, but still needs to be implemented. TG change recommended

Comments

@PeterParslow
Copy link

Hi,
I ran a test of a sample output from our new 'Administrative Units' production system, and was surprised to fail on au-gml.a.1 - it didn't find the one feature in the sample.

This may be related to failing gml.a.2, because we deliberately use a different root element. The reason we use our own Feature Collection is documented at https://www.ordnancesurvey.co.uk/docs/policies/gml-design-policy.pdf (section 3.2). I advised our supplier not to use the deprecated SpatialDataSet or gml:FeatureCollection.

But I had hoped that it would go on & validate the features within our collection.

Results at http://inspire-sandbox.jrc.ec.europa.eu/etf-webapp/v2/TestRuns/EID0e187bcd-1b27-42a0-8027-6b186626614e.html

Assertion URI: http://inspire-sandbox.jrc.ec.europa.eu/etf-webapp//v2/TestRuns/EID0e187bcd-1b27-42a0-8027-6b186626614e.html?lang=en#EID5c3747c0-ff39-4891-9213-45af8bbc746d

Uploaded sample zipped & attached:
BdyLine_Product_INSPIRE_Example_v4.zip

Peter

@cportele
Copy link
Collaborator

cportele commented Feb 6, 2018

Hi Peter - yes, the reason is the root element.

As stated in https://github.com/inspire-eu-validation/data-encoding/blob/3.3/inspire-gml/basic.md and the test report, only wfs:FeatureCollection (WFS 2.0), gml:FeatureCollection (GML 3.2) or base:SpatialDataSet (Base schema 3.2 or 3.3) are recognized. The use of wfs:FeatureCollection is recommended.

This approach is necessary as it is unclear how to select all features in an XML document with an unknown root element. Yes, //schema-element(gml:AbstractFeature) would do the trick in an XPath 2.0 implementation, but for performance reasons XML databases are typically not schema-aware and do not support this XPath 2.0 function in XQueries. BaseX is no exception.

If there is agreement in the MIG-T that this should be relaxed (I will tag this issue for discussion in the MIG-T subgroup), then another approach to identify all features in the XML documents is needed.

One aspect to consider in this is also that if the validator cannot identify the features in an XML file, other software may also have problems. This is why D2.7 recommends the use of wfs:FeatureCollection.

@PeterParslow
Copy link
Author

PeterParslow commented Feb 6, 2018 via email

@cportele
Copy link
Collaborator

cportele commented Feb 6, 2018

OK, I understand. Whatever the approach is that the MIG-T prefers, a reliable mechanism to identify the features is needed (for the validator and everyone else).

Just to avoid confusion: It is a recommendation in D2.7, not a requirement. Which is why the other two collection types are currently recognised, too, as we had seen them used with INSPIRE data.

@PeterParslow
Copy link
Author

PeterParslow commented Feb 7, 2018 via email

@cportele
Copy link
Collaborator

cportele commented Feb 7, 2018

We had to make it a "requirement" make all the other requirements testable. That said, if https://github.com/interactive-instruments/etf-webapp/issues/37 would be implemented, this would provide the capability to determine all features in XML documents and this test would no longer be needed.

But it is good news that the software in the OS plugfest obviously were all schema-aware (or maybe they just ignored the namespace and simply looked at the local element names FeatureCollection / featureMember, which could also be another convention to support in the validator).

@heidivanparys
Copy link
Contributor

GDAL/OGR seems to look at the local element names only:

@michellutz
Copy link

[2017.4 meeting 2018-02-15] This seems to be an ETF implementation issue (that could be fixed e.g. by implementing interactive-instruments/etf-webapp#37 as suggested by @cportele ). Since this test does not reflect a requirement, but is simply a pre-requisite for identifying features in the XML document, the test should be as relaxed as possible. But at the same time, some guidance would be useful also for other client applications, so they know what to expect. The solution used in GDAL/OGR seems to be a useful compromise. Therefore it is suggested to mirror this solution in the test (at least temporarily) and to document this in a corrigendum to D2.7 (section B.3.3 Root element of the exchange document) should be proposed.

@PeterParslow
Copy link
Author

It will be interesting to draft that corrigendum; I've been looking a bit more into the OGC definition of "feature collection", bearing in mind some of the findings of an OGC plugfest a few years back, in which just one of the software providers identified bugs in a number of OS feature collections (see http://www.opengeospatial.org/projects/initiatives/ukiap)

It turns out that GML 3.2.1 has one definition for a feature collection (i.e. short set of requirements that a feature type must satisfy to be considered a feature collection); GML Simple Features over rides it, giving a different definition (in order to rule out nested hierarchies of feature collections). The WFS Feature Collection does not satisfy either set of requirements.

@michellutz
Copy link

[2017.4 meeting 2018-03-16] The implementation of interactive-instruments/etf-webapp#37 could be useful. Independently, the solution used in OGR/GDAL to find features in feature collections should be proposed as a corrigendum to the INSPIRE Encoding Guidelines (D2.7). If accepted by the MIG, the ATS/ETS should be updated accordingly.

@michellutz
Copy link

[2017.4 meeting 2018-04-19] The proposed TG corrigendum is tracked on the MIG collaboration platform in https://ies-svn.jrc.ec.europa.eu/issues/3218

@michellutz michellutz added the progress: fix to be implemented Resolution has been agreed, but still needs to be implemented. label Aug 30, 2018
@michellutz
Copy link

The proposed TG corrigendum did not receive any feedback, so it should be implemented in the TGs, ATS and ETS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
progress: fix to be implemented Resolution has been agreed, but still needs to be implemented. TG change recommended
Projects
None yet
Development

No branches or pull requests

4 participants