[Qgis-developer] featureAtId Python
bernhard.stroebl at jena.de
bernhard.stroebl at jena.de
Fri Jul 8 03:17:15 EDT 2011
Dear All,
I am trying to access features from a geometryless PostgreSQL-Table by
their id, same code works with geometry-containing (PostGIS) layers.
In the Python-console enter:
>>> l=qgis.utils.iface.activeLayer() #geometryless table
>>> f=QgsFeature()
>>> l.featureAtId(571,f) #this id exists in the table
False
I tried on WinXP and Linux with QGIS 1.7.0
Am I missing something or shall I file a ticket?
regards
Bernhard
P.S.
This works:
>>> l.select(571)
>>> l.selectedFeatureCount()
1
________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
More information about the Qgis-developer
mailing list