[Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer
bernhard.stroebl at jena.de
Tue Apr 9 22:50:41 PDT 2013
I checked the docs for QgsVectorLayer.getFeatures and QgsFeatureIterator
but not for QgsFeatureRequest
thank you and all the best
Am 09.04.2013 18:10, schrieb Jürgen E. Fischer:
> Hi Bernhard,
> On Tue, 09. Apr 2013 at 15:09:31 +0200, Bernhard Ströbl wrote:
>> I am trying to access features of a geometryless layer derived from a
>> PostgreSQL table in current master.
>> if I do
>> feat = QgsFeature()
>> iter = myLayer.getFeatures(QgsFeatureRequest().setFilterFid(myFid))
>> returns False and I get a message in the PostgreSQL message tab stating
>> "Trying to fetch geometry on layer without geometry."
>> Can anybody confirm?
>> Do I miss anything or is this a bug?
> You request geometry (by not saying you don't want any) - and get refused
> because there's none.
> myLayer.getFeatures(QgsFeatureRequest().setFilterFid(myFid).setFlags( QgsFeatureRequest.NoGeometry ) )
> should work. Not really a bug, but inconvienent.
__________ Information from ESET Mail Security, version of virus signature database 8211 (20130409) __________
The message was checked by ESET Mail Security.
More information about the Qgis-developer