[Qgis-developer] Python and strange results using layer(.dataProvider()).getFeatures(...)
Matthias Kuhn
matthias at opengis.ch
Tue Aug 30 06:52:17 PDT 2016
Hi Casper
On 08/30/2016 02:59 PM, Casper Børgesen (CABO) wrote:
> Hi Nathan
>
>
>
> Thanks for clarifying that, I’ll try to put my faith in the layer. My
> question is then, why does the layer only respond with 2 features when I
> ask it for max 3 features, since 4 – 1 = 3?
>
I guess (no verification done) that in the background the limit is
forwarded to the dataprovider which returns 3 features from which 1 is
filtered out by the layer so only 2 remain.
Please report this as a bug. I'm not sure if an action will be taken,
most of the "fixes" to this which I can think of defeat the purpose of
sending as few requests as possible to the database, but on the other
hand, this situation here can really lead to confusion.
Matthias
More information about the Qgis-developer
mailing list