Class: QgsMemoryProviderUtils

class qgis.core.QgsMemoryProviderUtils

Bases: sip.wrapper

Utility functions for use with the memory vector data provider.

New in version 3.0: Methods

createMemoryLayer Creates a new memory layer using the specified parameters.

Signals

Attributes

createMemoryLayer(name: str, fields: QgsFields, geometryType: QgsWkbTypes.Type = QgsWkbTypes.NoGeometry, crs: QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem()) → QgsVectorLayer

Creates a new memory layer using the specified parameters. The caller takes responsibility for deleting the newly created layer.

Parameters:
  • name – layer name
  • fields – fields for layer
  • geometryType – optional layer geometry type
  • crs – optional layer CRS for layers with geometry