Re: [Qgis-developer] API proposal: fetching of features

2011-10-28 Thread luca_manganelli
Martin Dobias wrote on 27/10/2011 19.07.43 What do you think? I would like to gather your opinions - is it good/bad/complex/inefficient/nonintuitive/verbose/...? +1, .select() and derivates are, maybe, the most important function and it's crucial that they must be optimized. Using them in

Re: [Qgis-developer] API proposal: fetching of features

2011-10-28 Thread Nathan Woodrow
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

Re: [Qgis-developer] API proposal: fetching of features

2011-10-28 Thread Alexander Bruy
Hi Martin, 2011/10/27 Martin Dobias wonder...@gmail.com: - use flags instead of booleans: e.g. FetchGeometry | UseIntesect flags makes more sense than true, true +1 for use flags. This is much readable than current true, true. Also other proposed changes are reasonable for me. -- Alexander

[Qgis-developer] API proposal: fetching of features

2011-10-27 Thread Martin Dobias
Hi devs I believe that a good API for iteration over features of vector layers is quite crucial for a GIS because it is being used very heavily in application code and plguins. Recently after reading an article [1] and looking at the hints for designing qt-style api [2] I have realized that the