1

I'm serving a large layer (500 thousand polygons) using Geoserver WFS and what to be able to edit it using QGis. I've set a feature limit on the layer so I wont overload GeoServer with the request.

I can successully load and edit the WFS layer in QGIS but as soon as I reach the WFS feature limit, QGis will not bring any new polygons as I pan through the map canvas, even when I hit the refresh button in QGis. I was under the impression that QGIS would keep on updating the WFS layer whenever I moved around and that the feature limit in GeoServer would be a limit to a single request and not a total request. Am I getting things wrong?

2
  • What version are you using? I had a similar issue that seemed to be resolved in 2.2
    – Neil Benny
    Commented Mar 12, 2014 at 13:53
  • I'm using Qgis 2.2 and geoserver 2.3. I also have the cache feature turned off in QGis
    – Daniel
    Commented Mar 12, 2014 at 18:54

1 Answer 1

2

QGIS does not automatically refresh the WFS layer unless feature caching is turned off. The selection box is so far right in the Add WFS layers that is tends to be hidden.

enter image description here

In a non-cached mode QGIS is sending a new WFS request after every pan or zoom by using the visible map area as a BBOX.

The refresh button did not work for you because in a cached mode WFS requests do not use BBOX. Resfresh brings you the same features again. However, if they were meanwhile edited in the database you would get fresh data.

MaxFeatures hit before BBOX is full Small BBOX needs less than 100000 features to be filled

7
  • If I limit the number of features served in the WFS server, will QGIS work around that as I move the BBox? I mean, say I limit the server to 100 features and on the first load I get 50 features for my BBOX. Then I move and I should get other features displayed (+60). Since that exceeds the 100 feature limit in the server, will I have 10 features missing?
    – Daniel
    Commented May 18, 2014 at 20:00
  • No, when you move the map a new request is made and the previously fetched features will be wiped out.
    – user30184
    Commented May 19, 2014 at 6:14
  • This is not what I'm seeing. I've limited the WFS features in geoserver (2.3) and QGIS (2.2 OsGeo4W) will bring the features in "stripes", from top to bottom. So if I zoom to an area at the top of the region, the features will appear but, when I zoom to an area at the bottom and refresh the layers, no features are shown. This is with and without feature cache.
    – Daniel
    Commented May 20, 2014 at 18:50
  • I edited the answer and added two screen captures from QGIS 2.0.1. WFS layer is added with Cache feature off. New zoom and pan leads to new GetFeature. One exception, though. Zoom in within a previously fetched area does not trigger a new GetFeature.
    – user30184
    Commented May 20, 2014 at 19:27
  • That is not the behavior I'm seeing. I turned off the cache and loaded the WFS layer, while zoomed to the full extent. The features I received were limited to maxFeature. I then zoomed into a portion of the image that did not have polygons shown. QGIS did not refresh the WFS layer. I then pressed the refresh button but that did not work. No features shown. It appears as though each time I hit refresh Qgis gets a strip of polygons but it's not focusing on the BBox. I'm beggining to suspect that my spatial indexes are messed up.
    – Daniel
    Commented May 22, 2014 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.