INSPIRE-MIF / helpdesk-validator

Community discussion forum for INSPIRE validation issues
41 stars 22 forks source link

Is ImplementsSorting must be TRUE for INSPIRE? #897

Closed zguo closed 1 year ago

zguo commented 1 year ago

Dear all, While testing an INSPIRE download service as WFS, https://agsinspire1.esri.com/arcgis/rest/services/gn_spain2/MapServer/exts/InspireFeatureDownload/service?VERSION=2.0.0&SERVICE=wfs&REQUEST=getcapabilities

the OGC test engine reports the following error

OGC TEAM Engine reported a failed test: 1 schema validation error(s) detected.
 # Constraints on WFS 2.0 service descriptions.

_____
Severity: Error  
Message: The filter constraint 'ImplementsSorting' must be 'TRUE' for all conforming Basic WFS implementations.  
Test: fes:Constraint[@name='ImplementsSorting']/ows:DefaultValue = 'TRUE'  
Location: /*:WFS_Capabilities[namespace-uri()='http://www.opengis.net/wfs/2.0'][1]/*:Filter_Capabilities[namespace-uri()='http://www.opengis.net/fes/2.0'][1]/*:Conformance[namespace-uri()='http://www.opengis.net/fes/2.0'][1]  
 expected [false] but found [true]

Currently we have set ImplementsSorting to be FALSE in the capabilities, similar to example at https://github.com/inspire-eu-validation/ets-repository/blob/3ed17ef069b758420063fadb9c6872e4ff26dfa9/schemas/inspire_dls/1.0/examples/WFS20_Caps_Scenario2_long.xml

It seems per the OGC specification it is optional, below is in the 7.9.2 of the spec (url is at http://docs.opengeospatial.org/is/09-025r2/09-025r2.html#172).

7.9.2 Ad hoc query expression 7.9.2.1 Request Semantics An ad hoc query expression may be used in a GetPropertyValue (see Clause 10), GetFeature (see Clause 11), GetFeatureWithLock (see Clause 13) or LockFeature (see Clause 12) operation to identify the set of features to be operated upon. As shown in Figure 8, an ad hoc query expression contains a typeNames parameter, projection clause, a selection clause and a sorting clause. The mandatory typeNames parameter lists the name of one or more feature types to query. The optional projection clause identifies a subset of optional feature properties that shall be presented in the result set. The projection clause for XML-encoded ad hoc query expressions may also be used to control, on a per-property basis, how resource references (see 7.6.4) are resolved in the response document. NOTE How resource references are resolved in a response document can only be controlled at the operation level for KVP-encoded requests. This is accomplished using the RESOLVE, RESOLVEDEPTH and RESOLVETIMEOUT keywords (see 7.6.4.3). This is in contrast to XML-encoded requests where resource resolution can be controlled at the operation and property levels. The optional selection clause specifies criteria that conditionally select features from a server’s data store. The optional sorting clause specifies how the features in the response document should be ordered. An ad hoc query also allows a CRS to be asserted and used when presenting feature geometries in a response document.

Can you please confirm if ImplementsSorting is indeed required to be TRUE for INSPIRE?

Thanks,

ZhongPing

fabiovinci commented 1 year ago

Dear @zguo,

as you indicated, the errors come from the OGC validator and indeed it is strange that the samples contain the value "FALSE".

In any case, they are the same as the samples in the OGC specification which also contain the value "FALSE".

In addition, I would suggest you in the future to refer to the official schema repository - https://inspire.ec.europa.eu/schemas/ - since the ones in the ETS repository are not maintained.

The suggestion is to modify your service and it would be very appreciated if you could open a change proposal in the schema repository that requires the update of the WFS samples. Thanks.

zguo commented 1 year ago

Dear @fabiovinci

Thanks for pointing me to the location for the official schema repository and change proposal.

Actually we prefer to keep ImplementsSorting to FALSE and not have to change it to TRUE. For INSPIRE data, most of them are complicate WFS, GetFeature data extraction often involve multiple level of joins of data tables, implementing SORT would be quite difficult, thus prefer not have to implement if it is not required by the OGC/INSPIRE specification.

So the question we have is really whether ImplementsSorting is required to be "TRUE" by the specification, and whether the ogc test should report it as an error when this parameter is set to FALSE. From reading the spec, it seems sorting is optional, thus it is ok to set this parameter to "FALSE", but I am not that familiar with this parameter. if someone can clarify/confirm it is not required to be TRUE, it would be great.

Thanks.

fabiovinci commented 1 year ago

Dear @zguo,

since it seems there is a discrepancy between the WFS specification (the parameter seems optional and in the examples there is the value "FALSE") and the OGC Validator, you could open an issue in the dedicated repository (https://github.com/opengeospatial/ets-wfs20/issues/new/choose), referring to this issue.

zguo commented 1 year ago

Thanks @fabiovinci, I have reposted the issue at https://github.com/opengeospatial/ets-wfs20/issues/250

zguo commented 1 year ago

Dear @fabiovinci Based on feedback on the OGC forum, looks like ImplementsSorting is not mandatory for Simple WFS, but it is required to be "TRUE" for Basic WFS. For INSPIRE will Simple WFS be sufficient in this case, or does it need to be compliant for Basic WFS with regard to ImplementsSorting?

Thanks,

fgironatct commented 1 year ago

Hi, do we an update on this?

adrianarangel commented 1 year ago

Hi All, Dear @fabiovinci

From what I have read in the thread, the validator shows a correct value, because it must be TRUE, also this parameter is optional because it must be conformance to a WFS Basic and WFS simple, is this correct?

does this mean that we must change something in our software, make it optional?

Sorry, but it's a bit confusing.

Can you please confirm if ImplementsSorting is indeed required to be TRUE for INSPIRE Simple WFS?

Thanks.

yaizavalidador commented 1 year ago

Hi,

If ImplementsSorting value is TRUE in the GetCapabilities file and the error persist, it means that there is something in the software that we have to change, don't we? make the value optional? Thanks!

fabiovinci commented 1 year ago

Dear all,

in order to be compliant with the INSPIRE Network Service regulation you need to implement a "Pre-defined Atom" or a "Pre-defined WFS" (see "4.2. Conformance Classes for Download Services Technical Guidance" section of the Download Service TG).

The implementation of the "Direct WFS", which includes ISO 19142 'Basic WFS' Conformance Class, is optional.

For this reason, you need to choose "Pre-defined WFS" as the WFS type in the validator, if you want to validate this type of service.

image

zguo commented 1 year ago

Dear @fabiovinci,

Thank you very much for clarifying on the relevant requirements and the correct validator option to be applied for the service, you can close the question.

ZhongPing