[Qgis-developer] WFS provider without cache broken
wonder.sk at gmail.com
Mon May 26 09:07:04 PDT 2014
On Mon, May 26, 2014 at 9:57 PM, Vincent Mora <vincent.mora at oslandia.com> wrote:
> The WFS data provider seems broken when not-cached. As far I can see
> QgsWFSProvider::getFeatures( const QgsFeatureRequest& request ) is never
> called, and it's where the special case of uri with BBOX (i.e. non-cached)
> is dealt with.
True. I guess I must have broken that while implementing support for MTR :-/
> The feature request from the vector layer goes through QgsWFSFeatureSource
> where cached features are stored. I think that a big part of the code in
> QgsWFSProvider should go in QgsWFSFeatureSource in order to cleanly fix the
> Can I have a second opinion on that before working on in this direction ?
Not sure what do you mean by 'big part of the code' but I guess you
are referring to the routines that download WFS data and transform
them to a map of features. Currently the 'feature source' classes in
all providers are merely meant as a pure storage of information needed
for iterating, with no logic inside, and they are typically deleted
when iterators are closed. Because of that I would suggest moving any
logic regarding data retrieval to wfs feature iterator implementation.
In any case that code should not be in provider class.
More information about the Qgis-developer