Bug report #13117

cached wfs not downloading new features while panning

Added by Raymond Nijssen over 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Web Services clients/WFS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:21182

Description

When I zoom in to some area in nl:

epsg:28992
centroid: (149957,410248)
scale 1:800

and i add a wfs layer: bag:pand
from: http://geodata.nationaalgeoregister.nl/bag/wfs
with the "cache feature" unchecked

I get the features in my view extent as expected.

But when I pan, qgis is not downloading any new features. The layer keeps on being filled with the initial set of features.

I used this before and it worked. And it does work as it should at the qgis 2.8 osx version at my colleagues laptop.


Related issues

Related to QGIS Application - Bug report #11968: WFS-GetFeature broken (with "caching" unchecked) Closed 2015-01-08
Related to QGIS Application - Bug report #13401: WFS Cache Features option does not work anymore Closed 2015-09-22
Related to QGIS Application - Bug report #13293: WCS server broken on Windows Closed 2015-08-31
Related to QGIS Application - Feature request #14121: WFS client implement simple logic for caching and non-cac... Open 2016-01-16

History

#1 Updated by Giovanni Manghi over 9 years ago

  • Priority changed from Normal to Severe/Regression
  • Target version set to Future Release - High Priority
  • Operating System deleted (linux)
  • OS version deleted (ubuntu 14.04)

confirmed, it worked until 2.8.*, stopped in 2.10 and master.

#2 Updated by Richard Duivenvoorde over 9 years ago

Yep the 'caching' behaviour changed.

Before when you added a &BBOX to the provider uri (when using python interface), the layer was NON-cached and for every extent change there was a new WFS GetFeature request fired (desired behaviour)

In 2.10 and in current master adding this &BBOX to the uri does not work anymore.

As there is a tickbox 'Only request feature overlapping the current view extent' I would think that
Unchecking 'Cache Feature' and Unchecking 'Only overlapping' would give me the desired behaviour as before

But I do not see any difference between tickend en unticked 'Only overlapping' when uncached...

I think something is broken there...

And for the python interface, it would be helpfull if there were params like 'caching' or 'only_overlapped'...

#3 Updated by Richard Duivenvoorde about 9 years ago

related tickets: #13293, #13401, #11968

#4 Updated by Richard Duivenvoorde about 9 years ago

Adding more info:

The use case is this wfs:
http://geodata.nationaalgeoregister.nl/bag/wfs
holding ALL houses in The Netherlands (couple million)
the wfs maximizes the number of feature returned ot ... I think 15000 or so...

The working (2.8 behaviour) was:
- if UNchecked the 'Cache features' then the client added a bbox (good!) AND refetched the features after every Pan and Zoom Action (good!)

Now not anymore: only a first set is retrieved, and after that nothing happens anymore.

To me the two options 'Cache features' and ' only request in current bbox' more or less mimic there behaviour

Anyway: create a project:

EPSG:28992
xy: 104676.3,490097.6
scale: 1:1000

The possible combinations

combi 1

'Cache Feature' UNchecked
'Only request... overlapping' UNchecked

http://geodata.nationaalgeoregister.nl/bag/wfs?SERVICE":"WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=bag:pand&SRSNAME=EPSG:28992&BBOX=104403.35250264131173026,490059.08999344159383327,104862.29637185942556243,490342.09838123025838286

BBOX in request! Good, though it is hard to do caching AND retrieving new features I think...
But it does not retrieve new features anymore after the retrieval of the first set (like it did in earlier versions)...

combi 2

'Cache Feature' CHECKED
'Only request... overlapping' UNchecked

http://geodata.nationaalgeoregister.nl/bag/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=bag:pand&SRSNAME=EPSG:28992

OK, no bbox: we just request the first 15000 features (very outside the current bbox), but hey, that is what we asked for.
Pan action: does not add anything...

combi 3

'Cache Feature' UNchecked
'Only request... overlapping' CHECKED

http://geodata.nationaalgeoregister.nl/bag/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=bag:pand&SRSNAME=EPSG:28992&BBOX=104556.77736899332376197,490097.08506930683506653,104851.63538065302418545,490278.90968033944955096

OK, adding a bbox to the feature request (apparently because of the 'only request with current bbox'...
BUT panning or zooming OUT does NOT get new features :-(

combi 4

'Cache Feature' CHECKED
'Only request... overlapping' CHECKED

http://geodata.nationaalgeoregister.nl/bag/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=bag:pand&SRSNAME=EPSG:28992&BBOX=104556.77736899332376197,490097.08506930683506653,104851.63538065302418545,490278.90968033944955096

OK, adding a bbox to the feature request (apparently because of the 'Cache Features'
BUT panning or zooming OUT does NOT get new features :-(

#5 Updated by Raymond Nijssen about 9 years ago

Today I dug in this issue and all related ones. In my opinion, the reason this works badly (or not at all) is the complexity. Therefore I suggest to bring the number of options back to 2 "strategies":

1. cached: Download complete dataset one time and cache it in memory.

2. bbox: Fire a request with bounding box every time you pan/zoom.

We should get rid of the checkboxes in the interface because they provide too many (and also useless/illogical) combinations that are hard to understand and implement. If we add these 2 options as a combobox to the interface, it is more clear. And there is space to ever add some extra (nifty) option without breaking these existing ones.

Basically this will make things work again. But there are another 2 enhancements I'd like to propose:

1. Having this same strategy combobox in the Layer properties of a WFS layer. So you can change your strategy after adding the layer.

2. Show a warning when the number of received features is a multiple of 500, since there is high probability that the dataset is truncated server-side. issue #9444

Any thoughts on this?

#6 Updated by Phil Mountain about 9 years ago

Panning WFS in version 2.2 refreshes the map and works perfectly, finding out how this functionality was lost and reintroducing it will return us to the status quo ante.

#7 Updated by Jeremy Palmer almost 9 years ago

@Raymond Nijssen: I agree your comments about simplifying the UI to just have 2 simple options. You should raise another ticket for this.

However this issue has now been resolved in master 188625c. Closing ticket.

#8 Updated by Giovanni Manghi almost 9 years ago

  • Status changed from Open to Closed
  • Resolution set to fixed/implemented

#9 Updated by Jürgen Fischer over 7 years ago

Also available in: Atom PDF