[mapserver-dev] Call for discussion on MS RFC 114: Faster retrieval of shape count
Eichner, Andreas - SID
Andreas.Eichner at sid.sachsen.de
Thu Feb 11 06:13:38 PST 2016
Hi Even,
> > Quotation from
> > WFS 1.1.0 standard:
> >
> > "In this way [by using resultType=hits] a client may obtain a count of the
> > number of features that a query would return without having to incur the
> > cost of transmitting the entire result set."
since you started quoting it, I read the WFS v1.1 standard again and I think it really means what GeoServer and Deegree already implement. IMHO the standard's document has 3 relevant parts:
"The optional maxFeatures attribute can be used to limit the number of explicitly requested features [...] that a GetFeature request PRESENTS in the response document. [...] Once the maxFeatures limit is reached, the result set is truncated at that point."
And for the resultType attribute:
"The value hits indicates that a web feature service should [...] simply indicate the number of feature instance of the requested feature type(s) that satisfy the request."
In WFS 2.0 it reads "... the root element of the response container shall contain the count of the total number of resources that the operation found..." and it distinguished between "numberMatched" and "numberReturned".
And for OperationConstraint "DefaultMaxFeatures":
"Specifies the default value for the maxFeatures attribute of the <GetFeature> element."
(as a constraint it should be read as "enforced" instead of "default")
Putting them together I would read it as:
* GetFeature with resultType=hits returns an empty FeatureCollection with numberOfFeatures set to the whole number of features that satisfy the given filter
* GetFeature with resultType=results populates the returned FeatureCollection with at most maxFeatures or DefaultMaxFeatures if that is smaller and sets the numberOfFeatures to the amount actually returned in it
* a client should read and respect the GetFeature-operation's DefaultMaxFeatures constraint and set maxFeatures in its requests to a value actually less than or equal to that
Just my thoughts on that topic...
HTH
More information about the mapserver-dev
mailing list