Geoserver returns more than maxFeatures if more than 1 layer is requested in WFS request
----------------------------------------------------------------------------------------
Key: GEOS-1489
URL: http://jira.codehaus.org/browse/GEOS-1489
Project: GeoServer
Issue Type: Bug
Components: WFS
Affects Versions: 1.6.0-beta4
Reporter: Stefan Hansen
Assignee: Andrea Aime
Attachments: diff.txt
If in a WFS request features from more than 1 layer are requested, Geoserver (most likely) returns more features than specified in maxFeatures.
If a WFS request contains more than 1 layer, then Geoserver splits it up in single requests; for each layer one request. In the request for the first layer maxFeatures is set to the original value. If this first request returns n features, maxFeatures is set in the 2nd request to (original_maxFeatures - n). Usually, (original_maxFeatures - n) becomes at some stage 0. But if maxFeatures is ste to 0, Geoserver will return an unlimited number of features.
As far as I know the problem is in GetFeature.java in the method public FeatureCollectionType run(GetFeatureType request).
The requests for each layer are sent in a for loop. One of the conditions to end the for-loop is (count <= maxFeatures). If you remove the '=', everything should work fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira