I'm following this PyQgis workshop: http://www.qgisworkshop.org/html/workshop/python_in_qgis_tutorial2.html#accessing-data-attributes
I have a point layer shapefile. I want to be able to retrieve and store x, y and name of each point( they already exist in attribute table and have indexes of 10, 11 and 1), hopefully in a dictionary format ((x,y) as key, name as value).
My problem starts here:
while provider.nextFeature(feat): map = feat.attributeMap()
I can't figure out how to use this 'map' dictionary. iterating through it I either get
"PyQt4.QtCore.QVariant object at 0x23C9C3B0" or "built-in method toString of QVariant object at 0x10D38D50".
any help is appreciated!