[mapserver-dev] Call for discussion on MS RFC 114: Faster retrieval of shape count
Even Rouault
even.rouault at spatialys.com
Thu Feb 11 06:38:02 PST 2016
Le jeudi 11 février 2016 15:13:38, Eichner, Andreas - SID a écrit :
> 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
Hi Andreas,
Yes this could mean that resultType=hits should not be limited by server side
limitation. But if I were the devil advocate, I'd point to the conformance
test suite of WFS 2.0
"""
A.2.16.3
resultType parameter
a)
Test Purpose: Verify that the server correctly handles the resultType
parameter.
b)
Test Method: Device and execute a query with the resultType parameter set to
"results". Verify that the server generates a feature collection that includes
features as its content. Execute the same query with the resultType parameter
set to "hits". Verify that the server generate an empty feature collection
with the numberReturned parameter in the response set to zero and the
numberMatched parameter in the response set to the count of the number of
features the query would return if the resultType parameter was set to
"results".
"""
As written, if there is a server side limitation that is reached with
resultType=results, it would mean that resultType=hits should also take into
account this limitation. But perhaps the test is not precise enough...
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the mapserver-dev
mailing list