[Qgis-developer] API proposal: fetching of features

Nathan Woodrow madmanwoo at gmail.com
Fri Oct 28 04:20:51 EDT 2011


Good thinking Martin,

QgsFeatureRequest request;
request.setExpression( "type = 5 and $area > 100" );
request.setLimit(10)
layer->select( request );

I really like this API style.  We can add methods to QgsFeatureRequest for
better access without busting the select API, which is good imo.

Could even have the setMethods return the QgsFeatureRequest instance so you
could do.

QgsFeatureRequest request;
request.setExpression( "type = 5 and $area > 100"
).setLimit(10).setAttributes( {some list} );
layer->select( request );

A big +1 from me

- Nathan

On Fri, Oct 28, 2011 at 3:07 AM, Martin Dobias <wonder.sk at gmail.com> wrote:

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20111028/f6cdec4a/attachment.html


More information about the Qgis-developer mailing list