I have looked at a few tutorials on Python scripts for QGIS. All of them create new vector and raster layers with some existing data source e.g. shapefile or GeoTIFF or PostGIS database table.
Is it possible to create a QGIS layer through a python script, where I can create/add/modify new features in the Python script, as the need arises?
It will be typically a vector layer with point data and custom symbols.
Will this be possible? Is there an example I can look at?
I left the "addAttributes" part out and managed to put a dot on the map, so it works, thank you. I am using Ubuntu 12.04 and QGIS 1.8.0-Lisboa But what can cause the above mentioned error?
– Theuns Heydenrych Jul 26 '12 at 07:54setAttributeMapis no longer a method of QgsFeature classes, so this solution doesn't work for the most recent (its 2016) QGIS. – Spacedman Aug 08 '16 at 07:25