[Qgis-developer] create geometry less memory layer

Hugo Mercier hugo.mercier at oslandia.com
Mon Mar 7 06:03:31 PST 2016


Hi,

On 07/03/2016 14:59, matteo wrote:
> Hi Andreas,
> 
>> Hi Matteo, 
>>
>> Which version of QGIS? 
> 
> QGIS 2.15 dev
> 
>> Starting from 2.14 you can uncheck the checkbox "Geometry tpye and CRS"
>> and the result will be a scratch layer without geometry. After creation,
>> you can add additional attribute columns. 
> 
> awesome! I didn't know that!
> 
> Is there also a way with python trough QgsVectorLayer to do that?

Use "none" as geometry type:

QgsVectorLayer("none", "layer", "memory")

> 
> Thanks Andreas
> 
> Best
> 
> Matteo
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 



More information about the Qgis-developer mailing list