[Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

Bernhard Ströbl bernhard.stroebl at jena.de
Tue Apr 9 06:09:31 PDT 2013


Hi,

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))
iter.nextFeature(feat)
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?

Bernhard

P. S.
in 1.8 one could pass a Boolean in order to tell the dataProvider to 
fetch the geometry or not.


__________ Information from ESET Mail Security, version of virus signature database 8209 (20130409) __________

The message was checked by ESET Mail Security.
http://www.eset.com




More information about the Qgis-developer mailing list