Saturday, 7 March 2015

qgis - Filter features based on their attributes using Python?


How to Get features by their attributes (similar to Iqueryfilter in arcobjects) in Qgis using python? Instead of getting all features and filter it manually, is there any option to use where clause to filter it out?


Example: I have a field name called 'Counties'. It has more than fifty thousand of features.i.e not possible to fetch all features and filter it because of time consuming. So i can query it by using iqueryfilter.whereclause = 'Counties = Norwich' in arcobjects. Similar thing i need in PyQgis.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...